src/hb-aat-layout-morx-table.hh |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 51ce3828e67a8ca7e4ea4b69e88c395e243bf01f
Author: Behdad Esfahbod <beh...@behdad.org>
Date:   Fri Jan 19 18:36:39 2018 -0800

    [aat] Fix Ligature matching
    
    I hope... Makes "ffi" work with Zapfino. I'm not sure if doing it correctly 
though...

diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index aa7b6d90..c64dca06 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -362,7 +362,7 @@ struct LigatureSubtable
          if (unlikely (!match_length))
            return false;
 
-         buffer->move_to (match_positions[match_length - 1]);
+         buffer->move_to (match_positions[--match_length]);
 
          const HBUINT32 &actionData = ligAction[action_idx];
          if (unlikely (!actionData.sanitize (&c->sanitizer))) return false;
@@ -384,6 +384,7 @@ struct LigatureSubtable
            if (unlikely (!ligatureData.sanitize (&c->sanitizer))) return false;
            hb_codepoint_t lig = ligatureData;
 
+           match_positions[match_length++] = buffer->out_len;
            buffer->replace_glyph (lig);
 
            //ligature_idx = 0; // XXX Yes or no?
@@ -395,7 +396,6 @@ struct LigatureSubtable
          }
          /* TODO merge_clusters / unsafe_to_break */
 
-         match_length--;
          action_idx++;
        }
        while (!(action & LigActionLast));
commit bef509855c7a2c4400a947d2527d1dc048da1284
Author: Behdad Esfahbod <beh...@behdad.org>
Date:   Fri Jan 19 18:24:00 2018 -0800

    [aat] Add TODO

diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index 4a997eec..aa7b6d90 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -393,6 +393,7 @@ struct LigatureSubtable
            buffer->skip_glyph ();
            end--;
          }
+         /* TODO merge_clusters / unsafe_to_break */
 
          match_length--;
          action_idx++;
_______________________________________________
HarfBuzz mailing list
HarfBuzz@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/harfbuzz

Reply via email to