diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index 5d0611b..726d026 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -1861,6 +1861,8 @@ int UniscribeLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, //position so that iterating over glyph slots one at a time for //glyph fallback can keep context as to what characters are the //inputs that caused a missing glyph in a given font. + // + //See: fdo#46923 for extra complexities { int dir = 1; int out = rVI.mnMinCharPos; @@ -1871,7 +1873,7 @@ int UniscribeLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, } for(c = rVI.mnMinCharPos; c < rVI.mnEndCharPos; ++c) { - int i = out; + int i = out - mnSubStringMin; mpGlyphs2Chars[i] = c; out += dir; }