[HarfBuzz] harfbuzz: Branch 'master' - 3 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Oct 15 18:05:18 UTC 2018


 src/dump-emoji.cc               |    6 +++---
 src/hb-aat-layout-kerx-table.hh |    4 ++--
 src/hb-aat-layout-morx-table.hh |    7 ++++++-
 3 files changed, 11 insertions(+), 6 deletions(-)

New commits:
commit 55d5ea666c25f75e9b1bc2eb43cfb104a16ebe04
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Oct 15 11:04:49 2018 -0700

    [kerx] Merge clusters in Ligature

diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index 544dedde..8446a862 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -391,6 +391,12 @@ struct LigatureSubtable
 	unsigned int action_idx = entry->data.ligActionIndex;
 	unsigned int action;
 	unsigned int ligature_idx = 0;
+
+	if (unlikely (!match_length))
+	  return false;
+
+	buffer->merge_out_clusters (match_positions[0], buffer->out_len);
+
         do
 	{
 	  if (unlikely (!match_length))
@@ -428,7 +434,6 @@ struct LigatureSubtable
 	    buffer->skip_glyph ();
 	    end--;
 	  }
-	  /* TODO merge_clusters / unsafe_to_break */
 
 	  action_idx++;
 	}
commit bb35725cd760f07fdb0586453512a106e534b739
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Oct 15 10:20:39 2018 -0700

    [kerx/morx] More end-of-text protection

diff --git a/src/hb-aat-layout-kerx-table.hh b/src/hb-aat-layout-kerx-table.hh
index ae11963a..aa803977 100644
--- a/src/hb-aat-layout-kerx-table.hh
+++ b/src/hb-aat-layout-kerx-table.hh
@@ -172,7 +172,7 @@ struct KerxSubTableFormat1
 	   * list.  Discovered by testing. */
 	  unsigned int idx = stack[i];
 	  int v = *actions++;
-	  if (buffer->info[idx].mask & kern_mask)
+	  if (idx < buffer->len && buffer->info[idx].mask & kern_mask)
 	  {
 	    /* XXX Non-forward direction... */
 	    if (HB_DIRECTION_IS_HORIZONTAL (buffer->props.direction))
@@ -340,7 +340,7 @@ struct KerxSubTableFormat4
       hb_buffer_t *buffer = driver->buffer;
       unsigned int flags = entry->flags;
 
-      if (mark_set && entry->data.ankrActionIndex != 0xFFFF)
+      if (mark_set && entry->data.ankrActionIndex != 0xFFFF && buffer->idx < buffer->len)
       {
 	hb_glyph_position_t &o = buffer->cur_pos();
 	switch (action_type)
commit 8f3048a1f838484babc4948754c16dda8f53daf1
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date:   Mon Oct 15 12:16:47 2018 +0330

    [dump-emoji] minor

diff --git a/src/dump-emoji.cc b/src/dump-emoji.cc
index f14dbdbf..f45bc310 100644
--- a/src/dump-emoji.cc
+++ b/src/dump-emoji.cc
@@ -212,8 +212,8 @@ int main (int argc, char **argv)
 {
   if (argc != 2) {
     fprintf (stderr, "usage: %s font-file.ttf\n"
-		     "run it like `rm -rf out && mkdir out && src/dump-emoji font-file.ttf`\n",
-		     argv[0]);
+		     "run it like `rm -rf out && mkdir out && %s font-file.ttf`\n",
+		     argv[0], argv[0]);
     exit (1);
   }
 
@@ -231,7 +231,7 @@ int main (int argc, char **argv)
     fprintf (stderr, "./out is not accessible, create it please\n");
     exit (1);
   }
-  fwrite (argv[0], 1, strlen (argv[1]), font_name_file);
+  fwrite (argv[1], 1, strlen (argv[1]), font_name_file);
   fclose (font_name_file);
 
   hb_blob_t *blob = hb_blob_create_from_file (argv[1]);


More information about the HarfBuzz mailing list