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

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed Apr 17 20:50:36 PDT 2013


 src/hb-ot-layout-gpos-table.hh |    4 ++--
 src/hb-ot-layout-gsub-table.hh |    8 ++++----
 util/shape-consumer.hh         |    4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit e4046080c5d785c8dbf9ec9e3478ab9acc83e479
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Apr 17 23:49:54 2013 -0400

    [util] Unbreak --show-text / --show-unicode

diff --git a/util/shape-consumer.hh b/util/shape-consumer.hh
index 2b86a3c..8fd7ec3 100644
--- a/util/shape-consumer.hh
+++ b/util/shape-consumer.hh
@@ -51,11 +51,11 @@ struct shape_consumer_t
   {
     output.new_line ();
 
-    output.consume_text (buffer, text, text_len, shaper.utf8_clusters);
-
     for (unsigned int n = shaper.num_iterations; n; n--)
     {
       shaper.populate_buffer (buffer, text, text_len, text_before, text_after);
+      if (n == 1)
+	output.consume_text (buffer, text, text_len, shaper.utf8_clusters);
       if (!shaper.shape (font, buffer)) {
 	failed = true;
 	hb_buffer_set_length (buffer, 0);
commit 0dc3a4e0349d28f387a3b4c60a2f51962742738e
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Apr 17 23:04:03 2013 -0400

    Obssesive optimization
    
    Not measurable by any means, but conceptually this is faster since
    the mask matches more often than the digest.

diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
index 4413927..b2b5e9a 100644
--- a/src/hb-ot-layout-gpos-table.hh
+++ b/src/hb-ot-layout-gpos-table.hh
@@ -1480,8 +1480,8 @@ struct PosLookup : Lookup
 
     while (c->buffer->idx < c->buffer->len)
     {
-      if ((c->buffer->cur().mask & c->lookup_mask) &&
-	  digest->may_have (c->buffer->cur().codepoint) &&
+      if (digest->may_have (c->buffer->cur().codepoint) &&
+	  (c->buffer->cur().mask & c->lookup_mask) &&
 	  apply_once (c))
 	ret = true;
       else
diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
index 35d0729..5247c68 100644
--- a/src/hb-ot-layout-gsub-table.hh
+++ b/src/hb-ot-layout-gsub-table.hh
@@ -1202,8 +1202,8 @@ struct SubstLookup : Lookup
 
 	while (c->buffer->idx < c->buffer->len)
 	{
-	  if ((c->buffer->cur().mask & c->lookup_mask) &&
-	      digest->may_have (c->buffer->cur().codepoint) &&
+	  if (digest->may_have (c->buffer->cur().codepoint) &&
+	      (c->buffer->cur().mask & c->lookup_mask) &&
 	      apply_once (c))
 	    ret = true;
 	  else
@@ -1219,8 +1219,8 @@ struct SubstLookup : Lookup
 	c->buffer->idx = c->buffer->len - 1;
 	do
 	{
-	  if ((c->buffer->cur().mask & c->lookup_mask) &&
-	      digest->may_have (c->buffer->cur().codepoint) &&
+	  if (digest->may_have (c->buffer->cur().codepoint) &&
+	      (c->buffer->cur().mask & c->lookup_mask) &&
 	      apply_once (c))
 	    ret = true;
 	  else



More information about the HarfBuzz mailing list