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

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Oct 11 18:33:55 UTC 2018


 src/hb-graphite2.cc |   10 ++++++++--
 src/hb-ot-tag.cc    |    4 +++-
 2 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit 4f9e36e8cf5d9d3d3e5a1ed46149355ee5f5e9fb
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Oct 11 14:32:59 2018 -0400

    [graphite] Remove deprecated symbol use

diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc
index 965eccdb..7f3cbfdf 100644
--- a/src/hb-graphite2.cc
+++ b/src/hb-graphite2.cc
@@ -278,10 +278,16 @@ _hb_graphite2_shape (hb_shape_plan_t    *shape_plan,
   /* TODO ensure_native_direction. */
 
   hb_tag_t script_tag[2];
-  hb_ot_tags_from_script (hb_buffer_get_script (buffer), &script_tag[0], &script_tag[1]);
+  unsigned int count = 2;
+  hb_ot_tags_from_script_and_language (hb_buffer_get_script (buffer),
+				       HB_LANGUAGE_INVALID,
+				       &count,
+				       script_tag,
+				       nullptr, nullptr);
+  assert (count);
 
   seg = gr_make_seg (nullptr, grface,
-		     script_tag[1] == HB_OT_TAG_DEFAULT_SCRIPT ? script_tag[0] : script_tag[1],
+		     script_tag[count - 1],
 		     feats,
 		     gr_utf32, chars, buffer->len,
 		     2 | (hb_buffer_get_direction (buffer) == HB_DIRECTION_RTL ? 1 : 0));
commit da591f2a9d2ae2a5878d3b2ef78a6d589b19aab0
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Oct 11 14:30:15 2018 -0400

    Whitespace

diff --git a/src/hb-ot-tag.cc b/src/hb-ot-tag.cc
index 13b1e0fa..818d6ee5 100644
--- a/src/hb-ot-tag.cc
+++ b/src/hb-ot-tag.cc
@@ -348,7 +348,9 @@ hb_ot_tags_from_script_and_language (hb_script_t   script,
   {
     if (language_count && language_tags && *language_count)
       *language_count = 0;
-  } else {
+  }
+  else
+  {
     const char *lang_str, *s, *limit, *private_use_subtag;
     bool needs_language;
 
commit 4d205f0462b19f371df495b9cc12c0128f507de9
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Oct 11 14:25:48 2018 -0400

    [graphite] Fix deva/dev2 resolution
    
    See https://github.com/harfbuzz/harfbuzz/pull/730#issuecomment-428277800

diff --git a/src/hb-graphite2.cc b/src/hb-graphite2.cc
index fd5cec1a..965eccdb 100644
--- a/src/hb-graphite2.cc
+++ b/src/hb-graphite2.cc
@@ -281,7 +281,7 @@ _hb_graphite2_shape (hb_shape_plan_t    *shape_plan,
   hb_ot_tags_from_script (hb_buffer_get_script (buffer), &script_tag[0], &script_tag[1]);
 
   seg = gr_make_seg (nullptr, grface,
-		     script_tag[1] == HB_TAG_NONE ? script_tag[0] : script_tag[1],
+		     script_tag[1] == HB_OT_TAG_DEFAULT_SCRIPT ? script_tag[0] : script_tag[1],
 		     feats,
 		     gr_utf32, chars, buffer->len,
 		     2 | (hb_buffer_get_direction (buffer) == HB_DIRECTION_RTL ? 1 : 0));


More information about the HarfBuzz mailing list