BUG: 378523
Fixes bug 378523.
Without the patch, fonts specified to be bold/italic as well as fonts drawn in intense colors with the "Draw intense colors as bold" box selected would not render as such.
Konsole |
BUG: 378523
Fixes bug 378523.
Without the patch, fonts specified to be bold/italic as well as fonts drawn in intense colors with the "Draw intense colors as bold" box selected would not render as such.
Without patch under bug conditions:
echo -e "text \033[1mbold\033[0m text" -> "bold text" is not bold
With patch under bug conditions:
"echo -e "text \033[1mbold\033[0m text" -> "bold text" is now bold!
Lint Skipped |
Unit Tests Skipped |
Thank you for the patch! Can you put the following on its own line in the Summary section?
BUG: 378523
This is a special keyword that will cause that bug to get closed once this patch lands.
I honestly haven't any idea. This bug has been troubling me for months, and this fix finally brought my bold fonts back, so I'm personally quite happy! Even if it is just a temporary hack, perhaps it may give some insight as to the actual source of the bug.
Konsole uses the QFontDialog font selector dialog. Starting with Qt 5.8 (I think) this always sets the style name on the returned QFont instance. There is some disagreement among Qt devs whether this is a bug or a necessary feature so the safe thing to assume here is that the style name will continue to be set. AFAICS that's the only safe way forward which will give the intended/expected behaviour with all supported Qt versions.
That leaves 3 options:
1 use KFontRequester instead (which will supposedly be fixed)
2 use the current workaround
3 use a more elegant workaround that takes the QFont returned by the QFontDialog, constructs the equivalent QFont *without* stylename and uses that font instead.
Solution 1) would be the best if it weren't for the fact that it'll still need option 2 or 3 to give the expected behaviour with all supported KF5 and Qt5 versions.