Fix global feature handling
authorBehdad Esfahbod <behdad@behdad.org>
Sat, 29 May 2010 00:41:20 +0000 (20:41 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 29 May 2010 00:41:20 +0000 (20:41 -0400)
src/hb-ot-shape.cc

index a3cb89b..87cdf47 100644 (file)
@@ -168,8 +168,12 @@ struct hb_mask_allocator_t {
       if (infos[i].tag != infos[j].tag)
        infos[++j] = infos[i];
       else {
-       if (!infos[j].global)
+       if (infos[i].global)
+         infos[j] = infos[i];
+       else {
+         infos[j].global = infos[j].global && (infos[j].value == infos[i].value);
          infos[j].value = MAX (infos[j].value, infos[i].value);
+       }
       }
     count = j + 1;