Created attachment 104102 [details] KDE 4 vs Plasma 5 bold font in Dolphin Since some time kcm_fonts writes "font=Liberation Sans,10,-1,5,50,0,0,0,0,0, Regular" instead of "font=Liberation Sans,10,-1,5,50,0,0,0,0,0" to kdeglobals. So it breaks bold font rendering in System Settings, Dolphin url bar and some other places. The font is bold but gets a kind of blur. Removing ", Regular" from kdeglobals fixes font rendering. See the attached screenshot for System Settings (guest) and Dolphin/KF5 (guest) VS Dolphin/KDE4 (host) font rendering comparison. Maybe QFont() return format changed in Qt 5.7 or 5.8, that's why extra "Regular" is added to font settings. Just my quick guess.
Here's the commit: https://github.com/qt/qtbase/commit/5dd907bf639f43be7f2cdfdd44ec3795f1b31bf6
Related bug: https://bugs.kde.org/show_bug.cgi?id=348066 Maybe it makes sense to drop only some style names from QFont save string. Like Regular, Bold and Italic. Just because they are already covered by numeric values.
Created attachment 104131 [details] Ignore font style when reading config The patch restores old behaviour. But it's more like a hack so I don't submit it for review. Old behaviour was buggy in another way, see https://bugs.kde.org/show_bug.cgi?id=348066
(In reply to Pulfer from comment #2) > Maybe it makes sense to drop only some style names from QFont save string. > Like Regular, Bold and Italic. Just because they are already covered by > numeric values. On the other hand, fonts like Arial save localized style name ("Обычный" instead of "Regular"). And switching to Medium style (see #348066) for Ubuntu font likely will break bold font rendering anyway in many applications. So either font style should be ignored or all Qt/KDE applications should be fixed handle it properly.
I can confirm this bug and the solution mentioned in comment #0. QFont::toString() did indeed change from 5.7.0 to 5.8.0 ([QTBUG-54936]): http://code.qt.io/cgit/qt/qtbase.git/tree/dist/changes-5.8.0/?h=v5.8.0 https://bugreports.qt.io/browse/QTBUG-54936 I have described my struggles with this bug in this forum thread: https://forums.opensuse.org/showthread.php/524628-Weird-font-problem-No-bold-for-you-(kwin-konsole)
For some reason this is broken on Artful using libfreetype 2.8.1 (updated due to other hinting bug in 2.8.0) and Qt 5.9.1. Removing ",Regular" from font config in kdeglobals and Trolltech.conf resolved all my problems.
*** This bug has been marked as a duplicate of bug 378523 ***