https://bugs.kde.org/show_bug.cgi?id=378523

Ahmad Samir <a.samir...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://commits.kde.org/kco
                   |                            |nfig/a2774ff5b41987c3919a9e
                   |                            |cc54c70e0d4b3758ae
         Resolution|---                         |FIXED
   Version Fixed In|                            |5.68
             Status|CONFIRMED                   |RESOLVED

--- Comment #77 from Ahmad Samir <a.samir...@gmail.com> ---
Git commit a2774ff5b41987c3919a9ecc54c70e0d4b3758ae by Ahmad Samir.
Committed on 02/03/2020 at 10:51.
Pushed by ahmadsamir into branch 'master'.

[KConfigGui] Clear styleName font property for Regular font sytles

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,
(I didn't include some of the weird/non-common ones e.g. I've seen "Roma"
and "Rounded"). Some statistics about the "Regular"-like font styles from
my testing:
Regular:  2486
Normal:  66
Book:  20
Roman:  13

For more details see:
[1] https://bugreports.qt.io/browse/QTBUG-63792
https://bugs.kde.org/show_bug.cgi?id=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).

Reviewers: #frameworks, dfaure, davidedmundson, cfeck, ervin

Reviewed By: dfaure

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D27735

M  +16   -3    src/gui/kconfiggroupgui.cpp

https://commits.kde.org/kconfig/a2774ff5b41987c3919a9ecc54c70e0d4b3758ae

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to