diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-02-11 18:16:49 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-02-13 02:04:16 +0100 |
commit | d1ee7189553e13337b198fe4ba66d79fb7a7f41d (patch) | |
tree | 2260be276c82026558086596f396f7fc0922106f /src/gui/painting/qpaintengineex.cpp | |
parent | a65157e5b7a2a1c2f018507f9d45f5b311cd387c (diff) | |
download | qtbase-d1ee7189553e13337b198fe4ba66d79fb7a7f41d.tar.gz |
Add support for color glyphs (Emoji) on Mac OS X and iOS
A new glyph type is added to the glyph caches for ARGB bitmap glyphs,
and the raster and OpenGL paint engines have been modified to support
this glyph type for drawCachedGlyphs().
The CoreText font engine implements support for these glyphs through
the CTFontDrawGlyphs API, since CGContextShowGlyphsWithAdvances does
not handle color glyphs.
Change-Id: Idad9ce75a911cae130d65aebe59142772a16fc12
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/gui/painting/qpaintengineex.cpp')
-rw-r--r-- | src/gui/painting/qpaintengineex.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index 5ca6075423..6e72b5db7f 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -1088,6 +1088,9 @@ bool QPaintEngineEx::requiresPretransformedGlyphPositions(QFontEngine *, const Q bool QPaintEngineEx::shouldDrawCachedGlyphs(QFontEngine *fontEngine, const QTransform &m) const { + if (fontEngine->glyphFormat == QFontEngineGlyphCache::Raster_ARGB) + return true; + qreal pixelSize = fontEngine->fontDef.pixelSize; return (pixelSize * pixelSize * qAbs(m.determinant())) < QT_MAX_CACHED_GLYPH_SIZE * QT_MAX_CACHED_GLYPH_SIZE; |