QWinRTFontDatabase: Add "Arial" as alias for "Helvetica".
Otherwise, the first font from the list is used ("Algerian" or similar),
making the widgets/richtext/textedit example look bad.
Change-Id: Ia5bb8879f167fef7ad7e81611760ee042abf8da3
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
bb10
parent
6de49f4ab6
commit
f044b3cc67
|
|
@ -428,6 +428,20 @@ QFontEngine *QWinRTFontDatabase::fontEngine(const QFontDef &fontDef, void *handl
|
|||
return engine;
|
||||
}
|
||||
|
||||
QStringList QWinRTFontDatabase::fallbacksForFamily(const QString &family, QFont::Style style,
|
||||
QFont::StyleHint styleHint,
|
||||
QChar::Script script) const
|
||||
{
|
||||
Q_UNUSED(style)
|
||||
Q_UNUSED(styleHint)
|
||||
Q_UNUSED(script)
|
||||
|
||||
QStringList result;
|
||||
if (family == QLatin1String("Helvetica"))
|
||||
result.append(QStringLiteral("Arial"));
|
||||
return result;
|
||||
}
|
||||
|
||||
void QWinRTFontDatabase::releaseHandle(void *handle)
|
||||
{
|
||||
if (!handle)
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@ public:
|
|||
void populateFontDatabase() Q_DECL_OVERRIDE;
|
||||
void populateFamily(const QString &familyName) Q_DECL_OVERRIDE;
|
||||
QFontEngine *fontEngine(const QFontDef &fontDef, void *handle) Q_DECL_OVERRIDE;
|
||||
QStringList fallbacksForFamily(const QString &family, QFont::Style style,
|
||||
QFont::StyleHint styleHint, QChar::Script script) const Q_DECL_OVERRIDE;
|
||||
void releaseHandle(void *handle) Q_DECL_OVERRIDE;
|
||||
private:
|
||||
QHash<IDWriteFontFile *, FontDescription> m_fonts;
|
||||
|
|
|
|||
Loading…
Reference in New Issue