summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2013-01-11 16:58:43 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-14 14:07:48 +0100
commite11cf63b0babcba8709cd39ff46e43e773f7fa9f (patch)
tree9e225f8c34ac39aa5b8e69d25eb6a1bdd9e011b2 /src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
parent9941bf5118f1944fe882497444308e7d3a48e349 (diff)
Fix crash when trying to create paths for color-glyphs (Emoji) on Mac
CoreText segfaults when creating paths for color-glyphs: 0 0x00007fff8fd41e69 in TFont::FindColourBitmapForGlyph () 1 0x00007fff8fd417ac in TFont::CreatePathForGlyph () 2 0x000000010567d1af in QCoreTextFontEngine::addGlyphsToPath (...) So we shortcut the code-path, since we don't support Emoji yet anyways. Task-number: QTBUG-28615 Change-Id: Ife16ae4959077d9eaaf6ea5cd1f27a4e2e01e7f5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h')
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
index 6c5c557b13..b3a0968c4b 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
@@ -108,6 +108,21 @@ public:
virtual QFontEngine *cloneWithSize(qreal pixelSize) const;
virtual int glyphMargin(QFontEngineGlyphCache::Type type) { Q_UNUSED(type); return 0; }
+ static bool supportsColorGlyphs()
+ {
+#if defined(Q_OS_IOS)
+ return true;
+#elif MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ #if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
+ return &CTFontDrawGlyphs;
+ #else
+ return true;
+ #endif
+#else
+ return false;
+#endif
+ }
+
static int antialiasingThreshold;
static QFontEngineGlyphCache::Type defaultGlyphFormat;