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

Behdad Esfahbod behdad at kemper.freedesktop.org
Thu Nov 26 16:36:53 PST 2015


 NEWS                              |   15 +++++++++++++++
 configure.ac                      |    2 +-
 src/Makefile.am                   |    1 +
 src/hb-buffer.cc                  |    4 ++++
 src/hb-common.cc                  |    2 +-
 src/hb-fallback-shape.cc          |    2 +-
 src/hb-font-private.hh            |    2 +-
 src/hb-glib.cc                    |    2 ++
 src/hb-ot-font.cc                 |    2 ++
 src/hb-ot-layout.cc               |    8 +++++++-
 src/hb-ot-map.cc                  |    2 +-
 src/hb-ot-shape-complex-hangul.cc |    2 +-
 src/hb-ot-shape-complex-hebrew.cc |    2 +-
 src/hb-ot-shape-complex-indic.cc  |    4 ++--
 src/hb-ot-shape-normalize.cc      |    6 +++---
 src/hb-ot-shape.cc                |    6 +++++-
 16 files changed, 48 insertions(+), 14 deletions(-)

New commits:
commit d44d52bd0da033865641dfd39d94852119fd4fd7
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Nov 26 19:35:43 2015 -0500

    1.1.2

diff --git a/NEWS b/NEWS
index 9cfda32..3e8b100 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,18 @@
+Overview of changes leading to 1.1.2
+Wednesday, November 26, 2015
+====================================
+
+- Fix badly-broken fallback shaper that affected terminology.
+  https://github.com/behdad/harfbuzz/issues/187
+- Fix y_scaling in Graphite shaper.
+- API changes:
+  * An unset glyph_h_origin() function in font-funcs now (sensibly)
+    implies horizontal origin at 0,0.  Ie, the nil callback returns
+    true instead of false.  As such, implementations that have a
+    glyph_h_origin() that simply returns true, can remove that function
+    with HarfBuzz >= 1.1.2.  This results in a tiny speedup.
+
+
 Overview of changes leading to 1.1.1
 Wednesday, November 24, 2015
 ====================================
diff --git a/configure.ac b/configure.ac
index 62b1567..044a1d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 AC_PREREQ([2.64])
 AC_INIT([HarfBuzz],
-        [1.1.1],
+        [1.1.2],
         [http://bugs.freedesktop.org/enter_bug.cgi?product=harfbuzz],
         [harfbuzz],
         [http://harfbuzz.org/])
commit 35d18585fc57750d817f57bfffe569069f9803b5
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Nov 26 19:30:37 2015 -0500

    Fix a few docs blocks

diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc
index 5c71734..c271086 100644
--- a/src/hb-buffer.cc
+++ b/src/hb-buffer.cc
@@ -37,6 +37,8 @@
 
 
 /**
+ * hb_segment_properties_equal:
+ *
  * Since: 0.9.7
  **/
 hb_bool_t
@@ -52,6 +54,8 @@ hb_segment_properties_equal (const hb_segment_properties_t *a,
 }
 
 /**
+ * hb_segment_properties_hash:
+ *
  * Since: 0.9.7
  **/
 unsigned int
diff --git a/src/hb-glib.cc b/src/hb-glib.cc
index 7dbd83d..e203524 100644
--- a/src/hb-glib.cc
+++ b/src/hb-glib.cc
@@ -383,6 +383,8 @@ hb_glib_get_unicode_funcs (void)
 }
 
 /**
+ * hb_glib_blob_create:
+ *
  * Since: 0.9.38
  **/
 hb_blob_t *
diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc
index 8d33300..58586bf 100644
--- a/src/hb-ot-font.cc
+++ b/src/hb-ot-font.cc
@@ -370,6 +370,8 @@ retry:
 
 
 /**
+ * hb_ot_font_set_funcs:
+ *
  * Since: 0.9.28
  **/
 void
diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc
index 3d4ee16..b0257f6 100644
--- a/src/hb-ot-layout.cc
+++ b/src/hb-ot-layout.cc
@@ -130,6 +130,8 @@ hb_ot_layout_has_glyph_classes (hb_face_t *face)
 }
 
 /**
+ * hb_ot_layout_get_glyph_class:
+ *
  * Since: 0.9.7
  **/
 hb_ot_layout_glyph_class_t
@@ -140,6 +142,8 @@ hb_ot_layout_get_glyph_class (hb_face_t      *face,
 }
 
 /**
+ * hb_ot_layout_get_glyphs_in_class:
+ *
  * Since: 0.9.7
  **/
 void
@@ -365,6 +369,8 @@ hb_ot_layout_language_get_required_feature_index (hb_face_t    *face,
 }
 
 /**
+ * hb_ot_layout_language_get_required_feature:
+ *
  * Since: 0.9.30
  **/
 hb_bool_t
diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
index 7a93c62..1d9783e 100644
--- a/src/hb-ot-shape.cc
+++ b/src/hb-ot-shape.cc
@@ -855,6 +855,8 @@ _hb_ot_shape (hb_shape_plan_t    *shape_plan,
 
 
 /**
+ * hb_ot_shape_plan_collect_lookups:
+ *
  * Since: 0.9.7
  **/
 void
@@ -888,6 +890,8 @@ add_char (hb_font_t          *font,
 
 
 /**
+ * hb_ot_shape_glyphs_closure:
+ *
  * Since: 0.9.2
  **/
 void
commit 0e38c918b66df31978d8fd3d8271a9b781384545
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Nov 26 19:26:26 2015 -0500

    [introspection] Make scanner happy with HB_EXTERN

diff --git a/src/Makefile.am b/src/Makefile.am
index fe14287..ec55656 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -419,6 +419,7 @@ HarfBuzz_0_0_gir_CFLAGS = \
 	-DHB_OT_H_IN \
 	-DHB_GOBJECT_H \
 	-DHB_GOBJECT_H_IN \
+	-DHB_EXTERN= \
 	$(NULL)
 HarfBuzz_0_0_gir_LIBS = \
 	libharfbuzz.la \
commit ea512f71084296be3bd893f78650def894066de0
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Thu Nov 26 19:22:22 2015 -0500

    Use C-style casts instead of compare to 0, to convert hb_bool_t to bool

diff --git a/src/hb-common.cc b/src/hb-common.cc
index 176da8d..710b36e 100644
--- a/src/hb-common.cc
+++ b/src/hb-common.cc
@@ -521,7 +521,7 @@ hb_user_data_array_t::set (hb_user_data_key_t *key,
     }
   }
   hb_user_data_item_t item = {key, data, destroy};
-  bool ret = !!items.replace_or_insert (item, lock, replace != 0);
+  bool ret = !!items.replace_or_insert (item, lock, (bool) replace);
 
   return ret;
 }
diff --git a/src/hb-fallback-shape.cc b/src/hb-fallback-shape.cc
index 0cd623e..b5ebfc0 100644
--- a/src/hb-fallback-shape.cc
+++ b/src/hb-fallback-shape.cc
@@ -106,7 +106,7 @@ _hb_fallback_shape (hb_shape_plan_t    *shape_plan HB_UNUSED,
    */
 
   hb_codepoint_t space;
-  bool has_space = font->get_glyph (' ', 0, &space) != 0;
+  bool has_space = (bool) font->get_glyph (' ', 0, &space);
 
   buffer->clear_positions ();
 
diff --git a/src/hb-font-private.hh b/src/hb-font-private.hh
index c45258b..7255cb9 100644
--- a/src/hb-font-private.hh
+++ b/src/hb-font-private.hh
@@ -160,7 +160,7 @@ struct hb_font_t {
   HB_FONT_FUNCS_IMPLEMENT_CALLBACKS
 #undef HB_FONT_FUNC_IMPLEMENT
 
-  inline hb_bool_t has_glyph (hb_codepoint_t unicode)
+  inline bool has_glyph (hb_codepoint_t unicode)
   {
     hb_codepoint_t glyph;
     return get_glyph (unicode, 0, &glyph);
diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc
index fbc5d51..3d4ee16 100644
--- a/src/hb-ot-layout.cc
+++ b/src/hb-ot-layout.cc
@@ -742,7 +742,7 @@ hb_ot_layout_lookup_would_substitute_fast (hb_face_t            *face,
 					   hb_bool_t             zero_context)
 {
   if (unlikely (lookup_index >= hb_ot_layout_from_face (face)->gsub_lookup_count)) return false;
-  OT::hb_would_apply_context_t c (face, glyphs, glyphs_length, zero_context != 0);
+  OT::hb_would_apply_context_t c (face, glyphs, glyphs_length, (bool) zero_context);
 
   const OT::SubstLookup& l = hb_ot_layout_from_face (face)->gsub->get_lookup (lookup_index);
 
diff --git a/src/hb-ot-map.cc b/src/hb-ot-map.cc
index 1b8a3ac..7bdeddb 100644
--- a/src/hb-ot-map.cc
+++ b/src/hb-ot-map.cc
@@ -89,7 +89,7 @@ hb_ot_map_builder_t::hb_ot_map_builder_t (hb_face_t *face_,
 
   for (unsigned int table_index = 0; table_index < 2; table_index++) {
     hb_tag_t table_tag = table_tags[table_index];
-    found_script[table_index] = hb_ot_layout_table_choose_script (face, table_tag, script_tags, &script_index[table_index], &chosen_script[table_index]) != 0;
+    found_script[table_index] = (bool) hb_ot_layout_table_choose_script (face, table_tag, script_tags, &script_index[table_index], &chosen_script[table_index]);
     hb_ot_layout_script_find_language (face, table_tag, script_index[table_index], language_tag, &language_index[table_index]);
   }
 }
diff --git a/src/hb-ot-shape-complex-hangul.cc b/src/hb-ot-shape-complex-hangul.cc
index 52080a1..5f4d98b 100644
--- a/src/hb-ot-shape-complex-hangul.cc
+++ b/src/hb-ot-shape-complex-hangul.cc
@@ -301,7 +301,7 @@ preprocess_text_hangul (const hb_ot_shape_plan_t *plan,
     {
       /* Have <LV>, <LVT>, or <LV,T> */
       hb_codepoint_t s = u;
-      bool has_glyph = font->has_glyph (s) != 0;
+      bool has_glyph = font->has_glyph (s);
       unsigned int lindex = (s - SBase) / NCount;
       unsigned int nindex = (s - SBase) % NCount;
       unsigned int vindex = nindex / TCount;
diff --git a/src/hb-ot-shape-complex-hebrew.cc b/src/hb-ot-shape-complex-hebrew.cc
index 2e29bdd..3215900 100644
--- a/src/hb-ot-shape-complex-hebrew.cc
+++ b/src/hb-ot-shape-complex-hebrew.cc
@@ -68,7 +68,7 @@ compose_hebrew (const hb_ot_shape_normalize_context_t *c,
     0xFB4Au /* TAV */
   };
 
-  bool found = c->unicode->compose (a, b, ab) != 0;
+  bool found = (bool) c->unicode->compose (a, b, ab);
 
   if (!found && !c->plan->has_mark)
   {
diff --git a/src/hb-ot-shape-complex-indic.cc b/src/hb-ot-shape-complex-indic.cc
index 72b621e..5354897 100644
--- a/src/hb-ot-shape-complex-indic.cc
+++ b/src/hb-ot-shape-complex-indic.cc
@@ -1806,7 +1806,7 @@ decompose_indic (const hb_ot_shape_normalize_context_t *c,
     }
   }
 
-  return c->unicode->decompose (ab, a, b) != 0;
+  return (bool) c->unicode->decompose (ab, a, b);
 }
 
 static bool
@@ -1822,7 +1822,7 @@ compose_indic (const hb_ot_shape_normalize_context_t *c,
   /* Composition-exclusion exceptions that we want to recompose. */
   if (a == 0x09AFu && b == 0x09BCu) { *ab = 0x09DFu; return true; }
 
-  return c->unicode->compose (a, b, ab) != 0;
+  return (bool) c->unicode->compose (a, b, ab);
 }
 
 
diff --git a/src/hb-ot-shape-normalize.cc b/src/hb-ot-shape-normalize.cc
index f6a655d..3f00b8e 100644
--- a/src/hb-ot-shape-normalize.cc
+++ b/src/hb-ot-shape-normalize.cc
@@ -76,7 +76,7 @@ decompose_unicode (const hb_ot_shape_normalize_context_t *c,
 		   hb_codepoint_t *a,
 		   hb_codepoint_t *b)
 {
-  return c->unicode->decompose (ab, a, b) != 0;
+  return (bool) c->unicode->decompose (ab, a, b);
 }
 
 static bool
@@ -85,7 +85,7 @@ compose_unicode (const hb_ot_shape_normalize_context_t *c,
 		 hb_codepoint_t  b,
 		 hb_codepoint_t *ab)
 {
-  return c->unicode->compose (a, b, ab) != 0;
+  return (bool) c->unicode->compose (a, b, ab);
 }
 
 static inline void
@@ -127,7 +127,7 @@ decompose (const hb_ot_shape_normalize_context_t *c, bool shortest, hb_codepoint
       (b && !font->get_glyph (b, 0, &b_glyph)))
     return 0;
 
-  bool has_a = font->get_glyph (a, 0, &a_glyph) != 0;
+  bool has_a = (bool) font->get_glyph (a, 0, &a_glyph);
   if (shortest && has_a) {
     /* Output a and b */
     output_char (buffer, a, a_glyph);
diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
index bfbd533..7a93c62 100644
--- a/src/hb-ot-shape.cc
+++ b/src/hb-ot-shape.cc
@@ -688,7 +688,7 @@ hb_ot_position_complex (hb_ot_shape_context_t *c)
 {
   bool ret = false;
   unsigned int count = c->buffer->len;
-  bool has_positioning = hb_ot_layout_has_positioning (c->face) != 0;
+  bool has_positioning = (bool) hb_ot_layout_has_positioning (c->face);
   /* If the font has no GPOS, AND, no fallback positioning will
    * happen, AND, direction is forward, then when zeroing mark
    * widths, we shift the mark with it, such that the mark


More information about the HarfBuzz mailing list