[HarfBuzz] harfbuzz-ng: Branch 'master' - 2 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Aug 3 18:21:38 PDT 2012


 src/hb-ot-shape.cc   |    7 ++-----
 src/hb-shape-plan.cc |    2 ++
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 46ee108ef80f5d4675899862698a8c34d8fcfab5
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Aug 3 18:21:13 2012 -0700

    Fix leak

diff --git a/src/hb-shape-plan.cc b/src/hb-shape-plan.cc
index 974c370..ddfb501 100644
--- a/src/hb-shape-plan.cc
+++ b/src/hb-shape-plan.cc
@@ -148,6 +148,8 @@ hb_shape_plan_destroy (hb_shape_plan_t *shape_plan)
 #include "hb-shaper-list.hh"
 #undef HB_SHAPER_IMPLEMENT
 
+  hb_face_destroy (shape_plan->face);
+
   free (shape_plan);
 }
 
commit 71baea0062da4d7f143d62da38492a0813814e49
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Fri Aug 3 17:40:07 2012 -0700

    [OT] Use general-category, not GDEF class, to decide to zero mark advances
    
    At this point, the GDEF glyph synthesis looks pointless.  Not that I
    have many fonts without GDEF lying around.
    
    As for mark advance zeroing when GPOS not available, that also is being
    replaced by proper fallback mark positioning soon.

diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
index 28bb1f9..08457be 100644
--- a/src/hb-ot-shape.cc
+++ b/src/hb-ot-shape.cc
@@ -347,10 +347,7 @@ hb_synthesize_glyph_classes (hb_ot_shape_context_t *c)
 {
   unsigned int count = c->buffer->len;
   for (unsigned int i = 0; i < count; i++)
-    c->buffer->info[i].glyph_props() = FLAG (_hb_glyph_info_get_general_category (&c->buffer->info[i])) &
-				       (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) |
-					FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) |
-					FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)) ?
+    c->buffer->info[i].glyph_props() = _hb_glyph_info_get_general_category (&c->buffer->info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK ?
 				       HB_OT_LAYOUT_GLYPH_CLASS_MARK :
 				       HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH;
 }
@@ -398,7 +395,7 @@ hb_zero_mark_advances (hb_ot_shape_context_t *c)
 {
   unsigned int count = c->buffer->len;
   for (unsigned int i = 0; i < count; i++)
-    if (c->buffer->info[i].glyph_props() & HB_OT_LAYOUT_GLYPH_CLASS_MARK)
+    if (_hb_glyph_info_get_general_category (&c->buffer->info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)
     {
       c->buffer->pos[i].x_advance = 0;
       c->buffer->pos[i].y_advance = 0;



More information about the HarfBuzz mailing list