summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2016-03-22 14:16:23 -0700
committerGabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>2016-03-29 17:37:35 +0000
commitc35795b413c6aedd6b02f03fdcaa5fb4888084d5 (patch)
tree0ffd580344518eb544d9951f47bcac2769d6ae4c /src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
parent72ff2a2f0db1e728d2a53f546021018e076bbfb5 (diff)
QFontEngine: Add handle() function
Both QFont::handle() and QFont::freetypeFace() used to be available in Qt 4 but were removed in Qt 5. There's currently no API to get access to the native font handle, which the font engine holds in a way or another. Similar to the way it was in Qt 4, the actual handle type depends on the font engine currently in use. The types map as follows: Font Engine Native Handle ------------------------------------ DirectWrite IDWriteFontFace * Freetype FT_Face Mac CTFontRef Win HFONT All other font engines return a null handle. Change-Id: I3bea8259ac1378fd24079723aa6603bf9e74834c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
index 5b2e220fd6..c5831dd2e1 100644
--- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
@@ -639,6 +639,11 @@ QFontEngine *QWindowsFontEngineDirectWrite::cloneWithSize(qreal pixelSize) const
return fontEngine;
}
+Qt::HANDLE QWindowsFontEngineDirectWrite::handle() const
+{
+ return m_directWriteFontFace;
+}
+
void QWindowsFontEngineDirectWrite::initFontInfo(const QFontDef &request,
int dpi)
{