WinRT: fix default font when DirectWrite is disabled
Instead of loading the default font "Helvetica", which is likely not part of the package, load the first font found. Change-Id: I225979986883a26c3fec72858cf32c3d1e45d902 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This commit is contained in:
parent
c6b8779172
commit
05e8b54d23
@ -398,6 +398,13 @@ void QWinRTFontDatabase::releaseHandle(void *handle)
|
||||
QBasicFontDatabase::releaseHandle(handle);
|
||||
}
|
||||
|
||||
#endif // QT_WINRT_USE_DWRITE
|
||||
#else // QT_WINRT_USE_DWRITE
|
||||
|
||||
QFont QWinRTFontDatabase::defaultFont() const
|
||||
{
|
||||
return QFont(QFontDatabase().families().value(0));
|
||||
}
|
||||
|
||||
#endif // !QT_WINRT_USE_DWRITE
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
@ -61,9 +61,9 @@ class QWinRTFontDatabase : public QBasicFontDatabase
|
||||
{
|
||||
public:
|
||||
QString fontDir() const;
|
||||
QFont defaultFont() const Q_DECL_OVERRIDE;
|
||||
#ifdef QT_WINRT_USE_DWRITE
|
||||
~QWinRTFontDatabase();
|
||||
QFont defaultFont() const Q_DECL_OVERRIDE;
|
||||
void populateFontDatabase() Q_DECL_OVERRIDE;
|
||||
void populateFamily(const QString &familyName) Q_DECL_OVERRIDE;
|
||||
QFontEngine *fontEngine(const QFontDef &fontDef, void *handle) Q_DECL_OVERRIDE;
|
||||
|
Loading…
Reference in New Issue
Block a user