[Libreoffice-commits] core.git: helpcontent2 vcl/source

László Németh nemeth at numbertext.org
Fri Sep 6 02:10:25 PDT 2013


 helpcontent2                          |    2 +-
 vcl/source/glyphs/graphite_layout.cxx |   11 ++++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit 8fae91c67d3abed8158ada9ce1b0f79f3c10e165
Author: László Németh <nemeth at numbertext.org>
Date:   Fri Sep 6 11:08:02 2013 +0200

    fdo#68313 fix combining diacritics problem with Graphite fonts
    
    Change-Id: Ied29f864dc5fc21fc55aaa5ddd40b02b53a564f8

diff --git a/helpcontent2 b/helpcontent2
index 32c1712..0d8b37c 160000
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 32c171278a4aa94023069fb264c9192fbe056e6e
+Subproject commit 0d8b37cd9e0b89d1136b09a81671c88fc91fee3e
diff --git a/vcl/source/glyphs/graphite_layout.cxx b/vcl/source/glyphs/graphite_layout.cxx
index afd8411..e61da7c 100644
--- a/vcl/source/glyphs/graphite_layout.cxx
+++ b/vcl/source/glyphs/graphite_layout.cxx
@@ -591,7 +591,16 @@ gr_segment * GraphiteLayout::CreateSegment(ImplLayoutArgs& rArgs)
         }
         int numchars = gr_count_unicode_characters(gr_utf16, rArgs.mpStr + mnSegCharOffset,
                 rArgs.mpStr + (rArgs.mnLength > limit + 64 ? limit + 64 : rArgs.mnLength), NULL);
-        if (rArgs.mnMinCharPos + numchars > limit) numchars = limit - rArgs.mnMinCharPos; // fdo#52540
+        if (mnSegCharOffset + numchars > limit)
+        {
+            int combining_char = 0;
+            for (int i = mnSegCharOffset; i < numchars; i++) {
+                int ch = rArgs.mpStr[i];
+                if ((ch >= 0x300 && ch <= 0x36F) || (ch >= 0x1DC0 && ch <= 0x1DFF) ||
+                        (ch >= 0x20D0 && ch <= 0x20F0) || (ch >= 0xFE20 && ch <= 0xFE26)) combining_char++;
+            }
+            numchars = limit - mnSegCharOffset + combining_char; // fdo#52540, fdo#68313
+        }
         if (mpFeatures)
             pSegment = gr_make_seg(mpFont, mpFace, 0, mpFeatures->values(), gr_utf16,
                                         rArgs.mpStr + mnSegCharOffset, numchars, bRtl);


More information about the Libreoffice-commits mailing list