+
+ if(swffont->layout->bounds[t].xmax && swffont->layout->bounds[t].xmax*2 < advance) {
+ printf("fix bad advance value: bbox=%d, advance=%d (%f)\n", swffont->layout->bounds[t].xmax, advance, font->glyphs[t].advance);
+ advance = swffont->layout->bounds[t].xmax;
+ }
+
+ if(advance<32768) {
+ swffont->glyph[t].advance = advance;
+ } else {
+ swffont->glyph[t].advance = 32767;
+ }
+