+static void handleFontAlign1(TAG*tag)
+{
+ swf_SetTagPos(tag, 0);
+ U16 id = swf_GetU16(tag);
+ U8 flags = swf_GetU8(tag);
+ printf(" for font %04d, ", id);
+ if((flags&3)==0) printf("thin, ");
+ else if((flags&3)==1) printf("medium, ");
+ else if((flags&3)==2) printf("thick, ");
+ else printf("?, ");
+ int num=0;
+ while(tag->pos < tag->len) {
+ int nr = swf_GetU8(tag); // should be 2
+ int t;
+ if(nr>2) {
+ printf("*** unsupported multiboxes ***, ");
+ break;
+ }
+ for(t=0;t<nr;t++) {
+ float v1 = swf_GetF16(tag);
+ float v2 = swf_GetF16(tag);
+ }
+ U8 xyflags = swf_GetU8(tag);
+ num++;
+ }
+ printf(" %d glyphs", num);
+}
+
+static void handleFontAlign2(TAG*tag, char*prefix)
+{
+ if(!showfonts)
+ return;
+ swf_SetTagPos(tag, 0);
+ swf_GetU16(tag);
+ swf_GetU8(tag);
+ int num = 0;
+ while(tag->pos < tag->len) {
+ printf("%sglyph %d) ", prefix, num++);
+ int nr = swf_GetU8(tag); // should be 2
+ int t;
+ for(t=0;t<nr;t++) {
+ float v1 = swf_GetF16(tag);
+ float v2 = swf_GetF16(tag);
+ printf("%f/%f ", v1,v2);
+ }
+ U8 xyflags = swf_GetU8(tag);
+ printf("xy:%02x\n", xyflags);
+ }
+}
+
+