Fix font family name mismatch between localized and non-localized version
Localized font family names and their aliases are stored in font database. However, fallbacksForFamily gets non-localized family names which results in family name mismatch. Change-Id: Iddf9101e15a0e49c5ba4c049969fc90cb7853443 Task-number: QTBUG-40978 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
This commit is contained in:
parent
21d9ad8b11
commit
400f8a49b8
@ -1558,6 +1558,15 @@ bool QFontDatabase::isSmoothlyScalable(const QString &family, const QString &sty
|
||||
QtFontStyle::Key styleKey(style);
|
||||
|
||||
QtFontFamily *f = d->family(familyName);
|
||||
if (!f) {
|
||||
for (int i = 0; i < d->count; i++) {
|
||||
if (d->families[i]->matchesFamilyName(familyName)) {
|
||||
f = d->families[i];
|
||||
f->ensurePopulated();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!f) return smoothScalable;
|
||||
|
||||
for (int j = 0; j < f->count; j++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user