[HarfBuzz] harfbuzz: Branch 'master'

Simon Hausmann hausmann at kemper.freedesktop.org
Mon Feb 11 05:02:10 PST 2008


 src/harfbuzz-shaper.cpp |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 55a9382b5ee91cf6ba778add74b5d52f1df64315
Author: Simon Hausmann <shausman at trolltech.com>
Date:   Mon Feb 11 14:01:24 2008 +0100

    Fix setting of charstops for surrogate pairs.
    
    The charstop has to be set on the high surrogate character and must be
    false on the low surrogate one. Don't overwrite that in the assignment of the
    charstop property from the grapheme table later on.
    
    Signed-off-by: Lars

diff --git a/src/harfbuzz-shaper.cpp b/src/harfbuzz-shaper.cpp
index f756539..7077793 100644
--- a/src/harfbuzz-shaper.cpp
+++ b/src/harfbuzz-shaper.cpp
@@ -153,6 +153,7 @@ static void calcLineBreaks(const HB_UChar16 *uc, hb_uint32 len, HB_CharAttribute
         HB_GraphemeClass ngrapheme;
         HB_LineBreakClass ncls;
         HB_GetGraphemeAndLineBreakClass(code, &ngrapheme, &ncls);
+        charAttributes[i].charStop = graphemeTable[ngrapheme][grapheme];
         // handle surrogates
         if (ncls == HB_LineBreak_SG) {
             if (HB_IsHighSurrogate(uc[i]) && i < len - 1 && HB_IsLowSurrogate(uc[i+1])) {
@@ -170,8 +171,6 @@ static void calcLineBreaks(const HB_UChar16 *uc, hb_uint32 len, HB_CharAttribute
         if (ncls >= HB_LineBreak_SP)
             charAttributes[i].whiteSpace = true;
 
-        charAttributes[i].charStop = graphemeTable[ngrapheme][grapheme];
-
         HB_LineBreakType lineBreakType = HB_NoBreak;
         if (cls >= HB_LineBreak_LF) {
             lineBreakType = HB_ForcedBreak;



More information about the HarfBuzz mailing list