From c35795b413c6aedd6b02f03fdcaa5fb4888084d5 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 22 Mar 2016 14:16:23 -0700 Subject: 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 --- src/gui/text/qfontengine.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/gui/text/qfontengine.cpp') diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index 03ad6a24e9..39348a52b0 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -1229,6 +1229,11 @@ int QFontEngine::glyphCount() const return count; } +Qt::HANDLE QFontEngine::handle() const +{ + return Q_NULLPTR; +} + const uchar *QFontEngine::getCMap(const uchar *table, uint tableSize, bool *isSymbolFont, int *cmapSize) { const uchar *header = table; -- cgit v1.2.3