]> granicus.if.org Git - libass/commitdiff
shaper: use global features correctly
authorGrigori Goronzy <greg@chown.ath.cx>
Wed, 29 Jan 2014 04:23:55 +0000 (05:23 +0100)
committerGrigori Goronzy <greg@chown.ath.cx>
Wed, 29 Jan 2014 04:23:55 +0000 (05:23 +0100)
start/end of feature tags is unsigned, so use the proper constant
to signal to HarfBuzz that these features are global. This allows
HarfBuzz to cache shape plans, and that can considerably speed up
shaping, especially if many small runs need to be shaped.

libass/ass_shaper.c

index 0e818247072cadd6ddb109f8b24a3f7ccb84af6d..8f12291949c80430ccd3c4f9c3e434c028dc04fe 100644 (file)
@@ -140,15 +140,15 @@ static void init_features(ASS_Shaper *shaper)
 
     shaper->n_features = NUM_FEATURES;
     shaper->features[VERT].tag = HB_TAG('v', 'e', 'r', 't');
-    shaper->features[VERT].end = INT_MAX;
+    shaper->features[VERT].end = UINT_MAX;
     shaper->features[VKNA].tag = HB_TAG('v', 'k', 'n', 'a');
-    shaper->features[VKNA].end = INT_MAX;
+    shaper->features[VKNA].end = UINT_MAX;
     shaper->features[KERN].tag = HB_TAG('k', 'e', 'r', 'n');
-    shaper->features[KERN].end = INT_MAX;
+    shaper->features[KERN].end = UINT_MAX;
     shaper->features[LIGA].tag = HB_TAG('l', 'i', 'g', 'a');
-    shaper->features[LIGA].end = INT_MAX;
+    shaper->features[LIGA].end = UINT_MAX;
     shaper->features[CLIG].tag = HB_TAG('c', 'l', 'i', 'g');
-    shaper->features[CLIG].end = INT_MAX;
+    shaper->features[CLIG].end = UINT_MAX;
 }
 
 /**