diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-05-22 17:08:45 +0300 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-05-23 11:39:25 +0200 |
commit | 05e8b54d23e3d906d5f29113a73d88d3482c8f64 (patch) | |
tree | 961df7d12e6df85385f2609aa2e074e5ec6e2eac /src/plugins/platforms/winrt/qwinrtfontdatabase.cpp | |
parent | c6b877917241257d159bd3b9070c4be09231f40b (diff) |
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>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtfontdatabase.cpp')
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtfontdatabase.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtfontdatabase.cpp b/src/plugins/platforms/winrt/qwinrtfontdatabase.cpp index 7de223bbed..f4e1fbe533 100644 --- a/src/plugins/platforms/winrt/qwinrtfontdatabase.cpp +++ b/src/plugins/platforms/winrt/qwinrtfontdatabase.cpp @@ -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 |