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

Jonathan Kew jonathan at jfkew.plus.com
Thu May 20 13:32:30 PDT 2010


On 20 May 2010, at 17:48, Behdad Esfahbod wrote:

> src/hb-ot-layout-gsub-private.hh |    6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
> 
> New commits:
> commit 1cdbfd944eecb58587461f57f037e47a44f39990
> Author: Behdad Esfahbod <behdad at behdad.org>
> Date:   Thu May 20 17:47:28 2010 +0100
> 
>    Fix alternate, again

Hi Behdad - I figured out why Alternate was only affecting the first glyph, see below. With this patch, it behaves as expected.


diff --git a/gfx/harfbuzz/src/hb-ot-shape.cc b/gfx/harfbuzz/src/hb-ot-shape.cc
--- a/gfx/harfbuzz/src/hb-ot-shape.cc
+++ b/gfx/harfbuzz/src/hb-ot-shape.cc
@@ -133,20 +133,20 @@ setup_lookups (hb_face_t    *face,
 
     if (hb_ot_layout_language_find_feature (face, table_tag, script_index, language_index,
 					    features[i].tag,
 					    &feature_index))
       add_feature (face, table_tag, feature_index, mask, lookups, num_lookups, room_lookups);
 
     /* Turn mask on in the buffer, the über-slow way! */
     unsigned int count = buffer->len;
-    for (unsigned int i = 0; i < count; i++) {
-        unsigned int cluster = buffer->info[i].cluster;
+    for (unsigned int j = 0; j < count; j++) {
+        unsigned int cluster = buffer->info[j].cluster;
 	if (features[i].start <= cluster && cluster < features[i].end)
-	  buffer->info[i].mask |= value;
+	  buffer->info[j].mask |= value;
     }
   }
 
   qsort (lookups, *num_lookups, sizeof (lookups[0]), cmp_lookups);
 
   if (*num_lookups)
   {
     for (i = 1, j = 0; i < *num_lookups; i++)






More information about the HarfBuzz mailing list