From 2b15c9c256e5be597cfc3e8165d9b1a9047cfa7c Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Mon, 3 Mar 2014 06:37:29 +0200 Subject: Introduce a generic QFontEngine::canRender() implementation ...which uses the recently introduced glyphIndex() method; get rid of re-implementations that did almost the same. Change-Id: I6d32d2cee6a31f57de6aee05ed8d120d4a1f4e9c Reviewed-by: Lars Knoll --- src/gui/text/qfontengine_qpa.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/gui/text/qfontengine_qpa.cpp') diff --git a/src/gui/text/qfontengine_qpa.cpp b/src/gui/text/qfontengine_qpa.cpp index f48b44374e..b0bfd02448 100644 --- a/src/gui/text/qfontengine_qpa.cpp +++ b/src/gui/text/qfontengine_qpa.cpp @@ -515,29 +515,6 @@ QFontEngine::Type QFontEngineQPA::type() const return QFontEngine::QPF2; } -bool QFontEngineQPA::canRender(const QChar *string, int len) -{ - const uchar *cmap = externalCMap ? externalCMap : (fontData + cmapOffset); - - if (symbol) { - for (int i = 0; i < len; ++i) { - unsigned int uc = getChar(string, i, len); - glyph_t g = getTrueTypeGlyphIndex(cmap, uc); - if(!g && uc < 0x100) - g = getTrueTypeGlyphIndex(cmap, uc + 0xf000); - if (!g) - return false; - } - } else { - for (int i = 0; i < len; ++i) { - unsigned int uc = getChar(string, i, len); - if (!getTrueTypeGlyphIndex(cmap, uc)) - return false; - } - } - return true; -} - bool QFontEngineQPA::isValid() const { return fontData && dataSize && (cmapOffset || externalCMap) -- cgit v1.2.3