D27735: [KConfigGui] Clear styleName font property for Regular font sytles
Ahmad Samir
noreply at phabricator.kde.org
Sat Feb 29 09:56:17 GMT 2020
ahmadsamir created this revision.
ahmadsamir added reviewers: Frameworks, dfaure, davidedmundson, cfeck, ervin.
Herald added a project: Frameworks.
ahmadsamir requested review of this revision.
REVISION SUMMARY
If the styleName property is set for a QFont, using setBold(true) would
lead to Qt using an "emboldended"/synthetic font style instead of using
the bold style provided by the font itself (usually as a standalone font
file), the former looks ugly (IIUC, Freetype emboldens fonts as a last
resort for fonts that don't provide a bold style at all).
Accoring to upstream[1] the styleName property is useful for fonts with
fancy style names, and also it shouldn't be set if it's not needed; and
indeed using styleName with e.g. "Regular" doesn't make sense, as there
is no "Regular Bold" style AFAICS.
Checking for "Regular|Normal|Book|Roman" is based on examining the font
styles provided by the font packages available on OpenSuse Tumbleweed ATM,
and not checking for some of the weird/non-common ones e.g. I've seen "Roma"
and "Rounded".
For more details see:
[1] https://bugreports.qt.io/browse/QTBUG-63792
https://bugs.kde.org/show_bug.cgi?id=378523
BUG: 378523
FIXED-IN: 5.68
TEST PLAN
All unit tests still pass.
Changing the fonts via e.g. the fonts KCM doesn't append the font sytleName,
to the relevant font config entry, if the "Regular" style or co. is used.
A simple test, look at the current dir name in the Dolphin url bar with
and without ",Regular" appended to the font= entry (assuming you're using
Noto Sans or DejaVu Sans as the styleName varies from font to font).
REPOSITORY
R237 KConfig
BRANCH
l-font-sytleName (branched from master)
REVISION DETAIL
https://phabricator.kde.org/D27735
AFFECTED FILES
src/gui/kconfiggroupgui.cpp
To: ahmadsamir, #frameworks, dfaure, davidedmundson, cfeck, ervin
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200229/fa6ebdf0/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list