Fix enum passed to QFontDatabase::findFont
The script taken here is a QChar::Script, not a QFontDatabase::WritingSystem. This means it was passing QChar::Unknown. Change-Id: I919ae7187ba277346a7719116a94776dce24dd84 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>bb10
parent
fc4b0769a5
commit
1cd2955173
|
|
@ -160,8 +160,8 @@ private:
|
|||
static void createDatabase();
|
||||
static void parseFontName(const QString &name, QString &foundry, QString &family);
|
||||
static QString resolveFontFamilyAlias(const QString &family);
|
||||
static QFontEngine *findFont(const QFontDef &request, int script);
|
||||
static void load(const QFontPrivate *d, int script);
|
||||
static QFontEngine *findFont(const QFontDef &request, int script /* QChar::Script */);
|
||||
static void load(const QFontPrivate *d, int script /* QChar::Script */);
|
||||
|
||||
friend struct QFontDef;
|
||||
friend class QFontPrivate;
|
||||
|
|
|
|||
|
|
@ -1849,7 +1849,7 @@ QFontEngine *QFontEngineMulti::loadEngine(int at)
|
|||
// info about the actual script of the characters may have been discarded,
|
||||
// so we do not check for writing system support, but instead just load
|
||||
// the family indiscriminately.
|
||||
if (QFontEngine *engine = QFontDatabase::findFont(request, QFontDatabase::Any)) {
|
||||
if (QFontEngine *engine = QFontDatabase::findFont(request, QChar::Script_Common)) {
|
||||
engine->fontDef.weight = request.weight;
|
||||
if (request.style > QFont::StyleNormal)
|
||||
engine->fontDef.style = request.style;
|
||||
|
|
|
|||
Loading…
Reference in New Issue