Ensure the fontdatabase is initialized when requesting fallbacks
Otherwise we will return an empty list of fallbacks if no QFontDatabase has been created yet. Task-number: QTBUG-55222 Change-Id: I50508162fad3206e0acf3cc6eb39aefac5c3e197 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
This commit is contained in:
parent
2a6bea7a55
commit
c8cb188dd4
@ -840,9 +840,13 @@ QStringList QPlatformFontDatabase::fallbacksForFamily(const QString &family, QFo
|
||||
return retList;
|
||||
}
|
||||
|
||||
static void initializeDb();
|
||||
|
||||
static QStringList fallbacksForFamily(const QString &family, QFont::Style style, QFont::StyleHint styleHint, QChar::Script script)
|
||||
{
|
||||
QFontDatabasePrivate *db = privateDb();
|
||||
if (!db->count)
|
||||
initializeDb();
|
||||
|
||||
const FallbacksCacheKey cacheKey = { family, style, styleHint, script };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user