[Libreoffice-commits] .: vcl/win

Caolán McNamara caolan at kemper.freedesktop.org
Fri Apr 15 06:11:17 PDT 2011


 vcl/win/source/gdi/winlayout.cxx |   22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

New commits:
commit 8346cb2e68c4c46348786d7b6d790f5f8a991ca6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 15 14:11:04 2011 +0100

    Resolves: fdo#33090 better glyph fallback under windows for complex text

diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 2eb15fb..2fc0d73 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


More information about the Libreoffice-commits mailing list