+static SRECT getcharacterbbox(SWFFONT*font)
+{
+ SRECT r;
+ memset(&r, 0, sizeof(r));
+
+ int t;
+ printf("\n");
+ for(t=0;t<chardatapos;t++)
+ {
+ SRECT b = font->layout->bounds[chardata[t].charid];
+ b.xmin *= chardata[t].size;
+ b.ymin *= chardata[t].size;
+ b.xmax *= chardata[t].size;
+ b.ymax *= chardata[t].size;
+ b.xmin /= 1024;
+ b.ymin /= 1024;
+ b.xmax /= 1024;
+ b.ymax /= 1024;
+ b.xmin += chardata[t].x;
+ b.ymin += chardata[t].y;
+ b.xmax += chardata[t].x;
+ b.ymax += chardata[t].y;
+ printf("(%d,%d,%d,%d) -> (%d,%d,%d,%d)\n",
+ font->layout->bounds[chardata[t].charid].xmin,
+ font->layout->bounds[chardata[t].charid].ymin,
+ font->layout->bounds[chardata[t].charid].xmax,
+ font->layout->bounds[chardata[t].charid].ymax,
+ b.xmin,
+ b.ymin,
+ b.xmax,
+ b.ymax);
+ swf_ExpandRect2(&r, &b);
+ }
+ printf("-----> (%d,%d,%d,%d)\n",
+ r.xmin,
+ r.ymin,
+ r.xmax,
+ r.ymax);
+ return r;
+}
+