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

Behdad Esfahbod behdad at kemper.freedesktop.org
Fri Oct 1 15:49:23 PDT 2010


 src/hb-ot-layout-common-private.hh |    3 +--
 src/hb-ot-layout-gpos-private.hh   |    2 --
 2 files changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 2841436926d6a406bd1f4a35c66a0e3c2fdbeca7
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Sep 29 12:20:36 2010 -0400

    Don't zero glyph advances in MarkToBase and similar lookups
    
    See email thread "Should MarkToBase attachment zero the mark advance?"
    started by Jonathan Kew on 23 August 2010 for details.

diff --git a/src/hb-ot-layout-gpos-private.hh b/src/hb-ot-layout-gpos-private.hh
index a5f65b4..4969997 100644
--- a/src/hb-ot-layout-gpos-private.hh
+++ b/src/hb-ot-layout-gpos-private.hh
@@ -402,8 +402,6 @@ struct MarkArray : ArrayOf<MarkRecord>	/* Array of MarkRecords--in Coverage orde
     glyph_anchor.get_anchor (c->layout, c->buffer->info[glyph_pos].codepoint, &base_x, &base_y);
 
     hb_internal_glyph_position_t &o = c->buffer->pos[c->buffer->i];
-    o.x_advance = 0;
-    o.y_advance = 0;
     o.x_offset  = base_x - mark_x;
     o.y_offset  = base_y - mark_y;
     o.back      = c->buffer->i - glyph_pos;
commit 36b3862009c00ad922d68810173a69ac59723365
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Sep 29 12:10:24 2010 -0400

    One fewer cmp() implementation...

diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh
index 5db8f67..e3adfe8 100644
--- a/src/hb-ot-layout-common-private.hh
+++ b/src/hb-ot-layout-common-private.hh
@@ -57,8 +57,7 @@ template <typename Type>
 struct Record
 {
   inline int cmp (hb_tag_t a) const {
-    hb_tag_t b = tag;
-    return a < b ? -1 : a == b ? 0 : +1;
+    return tag.cmp (a);
   }
 
   inline bool sanitize (hb_sanitize_context_t *c, void *base) {



More information about the HarfBuzz mailing list