From 69fb70f6b3c88d4d2bb5ca97dbb7f77f42c828c5 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 9 Jul 2012 15:52:13 +0200 Subject: Support fallback fonts in DirectWrite font engine When selecting fallback fonts for a DirectWrite font, we would cast the font engine to QWindowsFontEngine and get unpredictable results and crashes. This change factors out getting the LOGFONT data from the QFontDef struct and will use this to create a new DirectWrite engine. Task-number: QTBUG-22658 Change-Id: I743944d9a44d8742b47b1aa3354532493362cc4a Reviewed-by: Jiang Jiang --- src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h') diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h index f5f20d57ce..32444c7cb0 100644 --- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h +++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.h @@ -99,6 +99,8 @@ public: bool canRender(const QChar *string, int len); Type type() const; + const QSharedPointer &fontEngineData() const { return m_fontEngineData; } + static QString fontNameSubstitute(const QString &familyName); private: -- cgit v1.2.3