diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-04-15 14:11:04 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-04-15 14:11:04 +0100 |
commit | e601c32661735e9fd78def7ee11bfe21279cca71 (patch) | |
tree | 053171308009d7656865719410f169cafcb23f86 /vcl/win | |
parent | 76fa265895f3a5a411e08627adc177811a548ffd (diff) |
Resolves: fdo#33090 better glyph fallback under windows for complex text
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/source/gdi/winlayout.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index a5866d8c6fd4..f9e576f09268 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -1859,6 +1859,28 @@ int UniscribeLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, const VisualItem& rVI = mpVisualItems[ nItem ]; if( rVI.IsEmpty() ) continue; + + //Resolves: fdo#33090 Ensure that all glyph slots, even if 0-width + //or empty due to combining chars etc, map back to a character + //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. + { + int dir = 1; + int out = rVI.mnMinCharPos; + if (rVI.IsRTL()) + { + dir = -1; + out = rVI.mnEndCharPos-1; + } + for(c = rVI.mnMinCharPos; c < rVI.mnEndCharPos; ++c) + { + int i = out; + mpGlyphs2Chars[i] = c; + out += dir; + } + } + // calculate the mapping by using mpLogClusters[] // mpGlyphs2Chars[] should obey the logical order // => reversing the loop does this by overwriting higher logicals |