summaryrefslogtreecommitdiffstats
path: root/src/gui/text/qfont.cpp
diff options
context:
space:
mode:
authorJiang Jiang <jiang.jiang@nokia.com>2010-12-02 16:28:24 (GMT)
committerJiang Jiang <jiang.jiang@nokia.com>2011-02-28 12:43:01 (GMT)
commit992f233cac66384685212e03dfa600664a23b924 (patch)
tree05fb9a79409ef4f02e33333aabfac651086d7112 /src/gui/text/qfont.cpp
parent49c866277e6aa7221a310a7635304c75d693bde5 (diff)
downloadQt-992f233cac66384685212e03dfa600664a23b924.zip
Qt-992f233cac66384685212e03dfa600664a23b924.tar.gz
Qt-992f233cac66384685212e03dfa600664a23b924.tar.bz2
Resolve font alias before testing for exact matching
It is required in X11 for resolving some default substitutions like 'sans', 'serif', etc. It also provides stub to implement similar replacement in other platforms like Windows. Task-number: QTBUG-15575 Reviewed-by: Eskil
Diffstat (limited to 'src/gui/text/qfont.cpp')
-rw-r--r--src/gui/text/qfont.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 084b7ac..64eb27a 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -139,6 +139,9 @@ 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