diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2010-12-02 17:28:24 +0100 |
---|---|---|
committer | Jiang Jiang <jiang.jiang@nokia.com> | 2011-02-28 13:43:01 +0100 |
commit | 992f233cac66384685212e03dfa600664a23b924 (patch) | |
tree | 05fb9a79409ef4f02e33333aabfac651086d7112 /src/gui/text/qfont.cpp | |
parent | 49c866277e6aa7221a310a7635304c75d693bde5 (diff) |
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.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp index 084b7ac988..64eb27a53f 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 |