らんだむな記憶

blogというものを体験してみようか!的なー

ちょっとだけharfbuzz(2)

以下のようにprint文をぶっこむ。

$ git diff
diff --git a/src/hb-shape.cc b/src/hb-shape.cc
index 352d42c..bbe902a 100644
--- a/src/hb-shape.cc
+++ b/src/hb-shape.cc
@@ -373,6 +373,11 @@ hb_shape_full (hb_font_t          *font,
               unsigned int        num_features,
               const char * const *shaper_list)
 {
+       for (int i = 0; i < num_features; i++) {
+               const uint8_t tag[] = { HB_UNTAG(features[i].tag) };
+               printf("tag:%c%c%c%c, value:%u\n", tag[0], tag[1], tag[2], tag[3], features[i].value);
+       }
+
   hb_shape_plan_t *shape_plan = hb_shape_plan_create_cached (font->face, &buffer->props, features, num_features, sh
   hb_bool_t res = hb_shape_plan_execute (shape_plan, font, buffer, features, num_features);
   hb_shape_plan_destroy (shape_plan);

で、

$ make -C ..

で必要なところを再コンパイルさせて、

$ ./hb-view --text="fi" --features="-liga" EBGaramond12-Regular.otf 
tag:liga, value:0

とかすると、リガチャの無効指定が hb_shape_full に渡ってきていることが分かる。