[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdelibs-bugs
Subject:    [frameworks-kwidgetsaddons] [Bug 378523] KFontRequester: Fonts are saved with face name preventing b
From:       RJVB <bugzilla_noreply () kde ! org>
Date:       2017-11-30 22:07:21
Message-ID: bug-378523-90985-W5PakRAsLi () http ! bugs ! kde ! org/
[Download RAW message or body]

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

--- Comment #25 from RJVB <rjvbertin@gmail.com> ---
>         if (font.bold())
>         {
>           font.setStyleName(QStringLiteral("Bold"));
>         }

What if you do `font.setWeight(QFont::Bold)` instead, possibly overriding the
styleName with `font.setStyleName(QString())` (supposing that indeed clears the
property)?

The impression I'm getting here is that the styleName property is something
that's best left untouched except when you want "to match the font with
irregular styles" (citing the 5.8.0 documentation for QFont). That
documentation also suggests the properties in question might not be possible to
capture with the other QFont attributes but I'd take that with a grain of salt.
Qt determines that styleName somehow and presumably that's from metadata stored
in the font and relayed through libfreetype of CoreText (styleName is
apparently not used on other platforms, yet).

-- 
You are receiving this mail because:
You are on the CC list for the bug.=
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic