+static void
+print_anchor (char *head, OTF_Anchor *anchor)
+{
+ if (anchor->AnchorFormat == 1)
+ fprintf (stderr, " %s(X:%d Y:%d)", head,
+ anchor->XCoordinate, anchor->YCoordinate);
+ else if (anchor->AnchorFormat == 2)
+ fprintf (stderr, " %s(X:%d Y:%d AP:%d)", head,
+ anchor->XCoordinate, anchor->YCoordinate,
+ anchor->f.f1.AnchorPoint);
+ else
+ fprintf (stderr, " %s(X:%d Y:%d +alpha)", head,
+ anchor->XCoordinate, anchor->YCoordinate);
+}
+
+static void
+print_glyph_positioning (OTF_Glyph *g, int type)
+{
+ if (type)
+ fprintf (stderr, " %0X=", g->glyph_id);
+ switch (g->positioning_type & 0xF)
+ {
+ case 1: case 2:
+ {
+ int format = g->f.f1.format;
+
+ if (format & OTF_XPlacement)
+ fprintf (stderr, "X:%d", g->f.f1.value->XPlacement);
+ if (format & OTF_XPlaDevice)
+ fprintf (stderr, "+alpha");
+ if (format & OTF_YPlacement)
+ fprintf (stderr, "Y:%d", g->f.f1.value->YPlacement);
+ if (format & OTF_YPlaDevice)
+ fprintf (stderr, "+alpha");
+ if (format & OTF_XAdvance)
+ fprintf (stderr, "X+:%d", g->f.f1.value->XAdvance);
+ if (format & OTF_XAdvDevice)
+ fprintf (stderr, "+alpha");
+ break;
+ }
+ case 3:
+ print_anchor ("entry", g->f.f3.entry_anchor);
+ print_anchor ("exit", g->f.f3.entry_anchor);
+ break;
+ case 4:
+ print_anchor ("mark", g->f.f4.mark_anchor);
+ print_anchor ("base", g->f.f4.base_anchor);
+ break;
+ case 5:
+ print_anchor ("mark", g->f.f5.mark_anchor);
+ print_anchor ("lig", g->f.f5.ligature_anchor);
+ break;
+ case 6:
+ print_anchor ("mark1", g->f.f6.mark1_anchor);
+ print_anchor ("mark2", g->f.f6.mark2_anchor);
+ break;
+ }
+}
+
+/* See the comment of lookup_gsub. */
+