diff options
author | Andrew Knight <andrew.knight@digia.com> | 2014-03-26 13:22:00 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-27 08:19:41 +0100 |
commit | 244e2ef7b9f078faecb9ec6f08c66864eb0ce399 (patch) | |
tree | bdca16f6c271e162cb8a64e5a41f72e7dca20d73 /src/plugins/platforms/winrt/qwinrtfontdatabase.h | |
parent | 071098b08b12fc1af6341ff6d7ba6713e5de1481 (diff) |
WinRT: Use registerFontFamily to reduce font registration overhead
Adopt to the new lazy font loading strategy in order to reduce memory
and startup time associated with populating the entire font database.
Change-Id: I0134cc123f73cb8485fe85c4a6b8e3b3a3a2cab0
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Diffstat (limited to 'src/plugins/platforms/winrt/qwinrtfontdatabase.h')
-rw-r--r-- | src/plugins/platforms/winrt/qwinrtfontdatabase.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtfontdatabase.h b/src/plugins/platforms/winrt/qwinrtfontdatabase.h index 6f194a10cc..b318a95502 100644 --- a/src/plugins/platforms/winrt/qwinrtfontdatabase.h +++ b/src/plugins/platforms/winrt/qwinrtfontdatabase.h @@ -48,6 +48,7 @@ QT_BEGIN_NAMESPACE #ifndef Q_OS_WINPHONE struct IDWriteFontFile; +struct IDWriteFontFamily; struct FontDescription { @@ -64,10 +65,12 @@ public: ~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; void releaseHandle(void *handle) Q_DECL_OVERRIDE; private: QHash<IDWriteFontFile *, FontDescription> m_fonts; + QHash<QString, IDWriteFontFamily *> m_fontFamilies; #endif // !Q_OS_WINPHONE }; |