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>
This commit is contained in:
parent
918b8d4e9e
commit
3904950af4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user