diff options
author | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-02-04 14:37:03 +0100 |
---|---|---|
committer | Andy Shaw <andy.shaw@theqtcompany.com> | 2016-02-05 13:20:05 +0000 |
commit | 3904950af44b7f062cf5ea5c782d197cb9b3cd30 (patch) | |
tree | fd2a2746dd91e33c3574447fe8938cb317e2f4b5 /src/plugins/platforms/windows | |
parent | 918b8d4e9e051e9b5882b7a7ada9ec3b390fc5a9 (diff) |
If the font is not being found then get the English name regardless
In a case of having a non English system locale, then the face and name of
the font may be localized but will not match up what is in the registry.
Therefore we need to try with the English name if is possible that there
is one, so in the case of when registerAlias is false we should try to get
the English name if necessary.
Change-Id: Id1064b6f5263677320374dbddfad852f30f041c5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp index 684c44acf2..88ceb37693 100644 --- a/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp +++ b/src/plugins/platforms/windows/qwindowsfontdatabase_ft.cpp @@ -454,6 +454,8 @@ static bool addFontToDatabase(const QString &faceName, const FontKey *key = findFontKey(faceName, &index); if (!key) { key = findFontKey(fullName, &index); + if (!key && !registerAlias && englishName.isEmpty() && localizedName(faceName)) + englishName = getEnglishName(faceName); if (!key && !englishName.isEmpty()) key = findFontKey(englishName, &index); if (!key) |