summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm2
-rw-r--r--src/plugins/platforms/windows/qwindowsfontengine.cpp1
-rw-r--r--src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp1
3 files changed, 4 insertions, 0 deletions
diff --git a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
index b07d59d3fe..92eaebb7b9 100644
--- a/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
+++ b/src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
@@ -211,6 +211,8 @@ bool QCoreTextFontEngine::stringToCMap(const QChar *str, int len, QGlyphLayout *
}
*nglyphs = glyph_pos;
+ glyphs->numGlyphs = glyph_pos;
+
if (flags & GlyphIndicesOnly)
return true;
diff --git a/src/plugins/platforms/windows/qwindowsfontengine.cpp b/src/plugins/platforms/windows/qwindowsfontengine.cpp
index b3bba55e97..d7f48e59c5 100644
--- a/src/plugins/platforms/windows/qwindowsfontengine.cpp
+++ b/src/plugins/platforms/windows/qwindowsfontengine.cpp
@@ -363,6 +363,7 @@ bool QWindowsFontEngine::stringToCMap(const QChar *str, int len, QGlyphLayout *g
return false;
}
+ glyphs->numGlyphs = *nglyphs;
*nglyphs = getGlyphIndexes(str, len, glyphs, flags & RightToLeft);
if (!(flags & GlyphIndicesOnly))
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);