summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsfontengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsfontengine.cpp')
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp
index 87eca98e44..a2f65c766d 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp
@@ -340,6 +340,30 @@ QWindowsFontEngine::~QWindowsFontEngine()
}
}
+glyph_t QWindowsFontEngine::glyphIndex(uint ucs4) const
+{
+ glyph_t glyph;
+
+#if !defined(Q_OS_WINCE)
+ if (symbol) {
+ glyph = getTrueTypeGlyphIndex(cmap, ucs4);
+ if (glyph == 0 && ucs4 < 0x100)
+ glyph = getTrueTypeGlyphIndex(cmap, ucs4 + 0xf000);
+ } else if (ttf) {
+ glyph = getTrueTypeGlyphIndex(cmap, ucs4);
+#else
+ if (tm.tmFirstChar > 60000) {
+ glyph = ucs4;
+#endif
+ } else if (ucs4 >= tm.tmFirstChar && ucs4 <= tm.tmLastChar) {
+ glyph = ucs4;
+ } else {
+ glyph = 0;
+ }
+
+ return glyph;
+}
+
HGDIOBJ QWindowsFontEngine::selectDesignFont() const
{
LOGFONT f = m_logfont;