From 5cf93c435228af9527f42aea32585cb156d78826 Mon Sep 17 00:00:00 2001 From: Konstantin Ritt Date: Mon, 9 Jul 2012 17:08:54 +0300 Subject: Fix the UCS-2 surrogates handling in Q*FontEndine*::stringToCmap() by making sure QGlyphLayout's numGlyphs member is properly initialized if the string-to-glyphs lookup was successful (tip: a surrogate pair produces a single glyph index). Change-Id: I01953f3b6281d79e1a214bfab0424e796d94769a Reviewed-by: Konstantin Ritt --- src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp | 1 + 1 file changed, 1 insertion(+) (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 1f7c4f485b..3490ebfc80 100644 --- a/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp +++ b/src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp @@ -330,6 +330,7 @@ bool QWindowsFontEngineDirectWrite::stringToCMap(const QChar *str, int len, QGly glyphs->glyphs[i] = glyphIndices[i]; *nglyphs = len; + glyphs->numGlyphs = len; if (!(flags & GlyphIndicesOnly)) recalcAdvances(glyphs, 0); -- cgit v1.2.3