summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsfontengine.cpp
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2014-03-03 06:37:29 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-03 11:11:27 +0100
commit2b15c9c256e5be597cfc3e8165d9b1a9047cfa7c (patch)
tree450a3727337fac5f54184a43909d4976dd8547d6 /src/plugins/platforms/windows/qwindowsfontengine.cpp
parentaf74201edbb9dc344419ed3f8ebc35f8e8f05617 (diff)
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 <lars.knoll@digia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsfontengine.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.cpp29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp
index a2f65c766d..264c22f47e 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp
@@ -777,35 +777,6 @@ const char *QWindowsFontEngine::name() const
return 0;
}
-bool QWindowsFontEngine::canRender(const QChar *string, int len)
-{
- if (symbol) {
- for (int i = 0; i < len; ++i) {
- unsigned int uc = getChar(string, i, len);
- if (getTrueTypeGlyphIndex(cmap, uc) == 0) {
- if (uc < 0x100) {
- if (getTrueTypeGlyphIndex(cmap, uc + 0xf000) == 0)
- return false;
- } else {
- return false;
- }
- }
- }
- } else if (ttf) {
- for (int i = 0; i < len; ++i) {
- unsigned int uc = getChar(string, i, len);
- if (getTrueTypeGlyphIndex(cmap, uc) == 0)
- return false;
- }
- } else {
- while(len--) {
- if (tm.tmFirstChar > string->unicode() || tm.tmLastChar < string->unicode())
- return false;
- }
- }
- return true;
-}
-
QFontEngine::Type QWindowsFontEngine::type() const
{
return QFontEngine::Win;