summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsfontdatabase.h
diff options
context:
space:
mode:
authorJian Liang <jianliang79@gmail.com>2015-07-07 22:23:33 +0800
committerjian liang <jianliang79@gmail.com>2015-07-20 22:09:29 +0000
commit4f15449bc2584ad299569c86f707994dca76d733 (patch)
tree488ee72082121a1607a2334ed617aa4f79beda10 /src/plugins/platforms/windows/qwindowsfontdatabase.h
parent6392927152c7ca66502bf8e0d3651e86a3151c54 (diff)
Windows: register alias for application font
Previously Qt didn't register an English name alias for application font files under Windows. Suppose we add an application font file using QFontDatabase::addApplicationFont(), the font family name returned by QFontDatabase::applicationFontFamilies() then was the English name of the font file, but the corresponding font family name returned by QFontDatabase::families() was the localized version. This prevented us from using the English font family to access the font since it was not registered as alias. Add an overload of populateFamily() which will register the English name of the application font file as alias. Task-number: QTBUG-47096 Change-Id: Idb89b7d8a419646c209426e826e7fd1ebee49662 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsfontdatabase.h')
-rw-r--r--src/plugins/platforms/windows/qwindowsfontdatabase.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase.h b/src/plugins/platforms/windows/qwindowsfontdatabase.h
index 3615612c78..efb5421996 100644
--- a/src/plugins/platforms/windows/qwindowsfontdatabase.h
+++ b/src/plugins/platforms/windows/qwindowsfontdatabase.h
@@ -100,6 +100,7 @@ public:
static QString familyForStyleHint(QFont::StyleHint styleHint);
private:
+ void populateFamily(const QString &familyName, bool registerAlias);
void removeApplicationFonts();
struct WinApplicationFont {