summaryrefslogtreecommitdiffstats
path: root/src/gui/text
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2016-05-11 15:10:50 +0300
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>2016-05-12 10:13:42 +0000
commit78eeb6b066113c678fe15531ca10e70964f6b9a4 (patch)
treebd76de7a6f17ecdf1c0fedff393c5ec091f7bb0c /src/gui/text
parent9ef59b586d6c65404835c5003a0f486ef9e162c3 (diff)
QFont::exactMatch() should return false for aliases
This is a partial revert of 992f233c in Qt 4 repo. The rest of the change cannot be reverted, since it added public API, but that API might be useful anyway. The patch was wrong, basically. QFont::exactMatch() should not claim that you can get an exact match for a typeface alias. It also introduced some weird inconsistencies: For instance, if the first font the alias resolved to in FontConfig did not exist, then exactMatch() would return false, even if it then resolved to the next one which existed. This caused a test failure on OpenSuse, where the preferred font for "sans" is Arial, which doesn't exist, so Roboto will be used instead. [ChangeLog][QtGui][Important Behavior Changes] QFont::exactMatch() now returns false when the provided typeface is an alias. Task-number: QTBUG-46054 Change-Id: I7532d2879b492544620aa0d1d87dd493a4923af9 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/gui/text')
-rw-r--r--src/gui/text/qfont.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 7e18250087..f92e4ab457 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -118,9 +118,6 @@ bool QFontDef::exactMatch(const QFontDef &other) const
QFontDatabase::parseFontName(family, this_foundry, this_family);
QFontDatabase::parseFontName(other.family, other_foundry, other_family);
- this_family = QFontDatabase::resolveFontFamilyAlias(this_family);
- other_family = QFontDatabase::resolveFontFamilyAlias(other_family);
-
return (styleHint == other.styleHint
&& styleStrategy == other.styleStrategy
&& weight == other.weight