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 --- .../windows/qwindowsfontenginedirectwrite.cpp | 23 ---------------------- 1 file changed, 23 deletions(-) (limited to 'src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp') diff --git a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp index cd5defdfea..744058279e 100644 --- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp +++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp @@ -647,29 +647,6 @@ const char *QWindowsFontEngineDirectWrite::name() const return 0; } -bool QWindowsFontEngineDirectWrite::canRender(const QChar *string, int len) -{ - QVarLengthArray codePoints(len); - int actualLength = 0; - for (int i=0; i glyphIndices(actualLength); - HRESULT hr = m_directWriteFontFace->GetGlyphIndices(codePoints.data(), actualLength, - glyphIndices.data()); - if (FAILED(hr)) { - qErrnoWarning("%s: GetGlyphIndices failed", __FUNCTION__); - return false; - } - - for (int i = 0; i < actualLength; ++i) { - if (glyphIndices.at(i) == 0) - return false; - } - - return true; -} - QFontEngine::Type QWindowsFontEngineDirectWrite::type() const { return QFontEngine::DirectWrite; -- cgit v1.2.3