[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Jul 18 13:31:35 PDT 2013


 src/hb-ot-layout-gsubgpos-private.hh |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit 8751de50831338ce550601c34c17d152ad89c1fd
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Jul 18 16:29:50 2013 -0400

    Followup fix for 3f9e2dced298c3d00f31b2dfc38685bb071a3a22
    
    During GSUB, if a ligation happens, subsequence context input matching
    matches the new indexing.  During GPOS however, the indices never
    change.  So just go one by one.
    
    Fixes 'dist' positioning with mmrtext.ttf and the following sequence:
    
      U+1014,U+1039,U+1011,U+1014,U+1039,U+1011,U+1014,U+1039,U+1011
    
    Reported by Jonathan Kew.

diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
index 2b95009..9ac99fe 100644
--- a/src/hb-ot-layout-gsubgpos-private.hh
+++ b/src/hb-ot-layout-gsubgpos-private.hh
@@ -1009,6 +1009,8 @@ static inline bool apply_lookup (hb_apply_context_t *c,
   unsigned int i = 0;
   if (lookupCount && 0 == lookupRecord->sequenceIndex)
   {
+    unsigned int old_pos = c->buffer->idx;
+
     /* Apply a lookup */
     bool done = c->recurse (lookupRecord->lookupListIndex);
 
@@ -1020,6 +1022,8 @@ static inline bool apply_lookup (hb_apply_context_t *c,
       goto not_applied;
     else
     {
+      if (c->table_index == 1)
+        c->buffer->idx = old_pos + 1;
       /* Reinitialize iterator. */
       hb_apply_context_t::skipping_forward_iterator_t tmp (c, c->buffer->idx - 1, count - i);
       tmp.set_syllable (syllable);
@@ -1041,6 +1045,8 @@ static inline bool apply_lookup (hb_apply_context_t *c,
 
     if (lookupCount && i == lookupRecord->sequenceIndex)
     {
+      unsigned int old_pos = c->buffer->idx;
+
       /* Apply a lookup */
       bool done = c->recurse (lookupRecord->lookupListIndex);
 
@@ -1052,6 +1058,8 @@ static inline bool apply_lookup (hb_apply_context_t *c,
 	goto not_applied2;
       else
       {
+	if (c->table_index == 1)
+	  c->buffer->idx = old_pos + 1;
         /* Reinitialize iterator. */
 	hb_apply_context_t::skipping_forward_iterator_t tmp (c, c->buffer->idx - 1, count - i);
 	tmp.set_syllable (syllable);



More information about the HarfBuzz mailing list