Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.7.0 Beta
-
None
-
Mageia Linux Cauldron x86_64.
-
82c422b5b1c81f0572fdb2be1efba900200680d8
Description
When code from themes set font it calls QFont::exactMatch(). But I've found, that function always return false, even if the font available. This is output from debugger in QFontDef::exactMatch(), that is called by exactMatch() when Material theme is used:
other @0x854f00 QFontDef & fallBackFamilies <0 элементов> QStringList family "Roboto" QString fixedPitch 0 uint fixedPitchComputed 0 uint hintingPreference 0 uint ignorePitch 0 uint pixelSize 13 qreal pointSize 9.75 qreal reserved 0 int stretch 100 uint style 0 uint styleHint 5 uint styleName "Regular" QString styleStrategy 1 uint weight 50 uint other_family <недоступно> QString other_foundry "" QString this @0x874558 QFontDef fallBackFamilies <0 элементов> QStringList family "Roboto" QString fixedPitch 0 uint fixedPitchComputed 0 uint hintingPreference 0 uint ignorePitch 1 uint pixelSize -1 qreal pointSize 10 qreal reserved 0 int stretch 100 uint style 0 uint styleHint 5 uint styleName "" QString styleStrategy 1 uint weight 50 uint this_family <недоступно> QString this_foundry "" QString
Though fonts are found, some parameters mismatch: pixelSize, pointSize and ignorePitch. I don't know, is it a bug in Qt font system or exactMatch() shouldn't be used this way.
On my system I have no font installed system-wide, I loaded the font using QFontDatabase::addApplicationFontFromData(), but this may be reproducible when font installed into system too.
Attachments
For Gerrit Dashboard: QTBUG-53377 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
159212,4 | Don't use QFont::exactMatch() for fonts comparison | 5.7 | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |