X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fdevices%2Fswf.c;h=3277938986b2776fc73a65e68e01d36ff5936103;hb=ea87e32fc17cce0b6633b88df1855f538efe9652;hp=42bb610f49c5f6a47ffc3adfe6df3039423e1440;hpb=275179c87d277416cfcc0d7a346ed60c4545ba31;p=swftools.git diff --git a/lib/devices/swf.c b/lib/devices/swf.c index 42bb610..3277938 100644 --- a/lib/devices/swf.c +++ b/lib/devices/swf.c @@ -1465,24 +1465,26 @@ void swfoutput_finalize(gfxdevice_t*dev) endpage(dev); fontlist_t *iterator = i->fontlist; + char use_font3 = i->config_flashversion>=8 && !NO_FONT3; while(iterator) { TAG*mtag = i->swf->firstTag; if(iterator->swffont) { + if(use_font3) { + // needs to be done before the reduce + swf_FontCreateAlignZones(iterator->swffont); + } if(!i->config_storeallcharacters) { msg(" Reducing font %s", iterator->swffont->name); swf_FontReduce(iterator->swffont); } int used = iterator->swffont->use && iterator->swffont->use->used_glyphs; if(used) { - if(i->config_flashversion<8 || NO_FONT3) { + if(!use_font3) { mtag = swf_InsertTag(mtag, ST_DEFINEFONT2); swf_FontSetDefine2(mtag, iterator->swffont); } else { mtag = swf_InsertTag(mtag, ST_DEFINEFONT3); swf_FontSetDefine2(mtag, iterator->swffont); - - swf_FontCreateAlignZones(iterator->swffont); - if(iterator->swffont->alignzones) { mtag = swf_InsertTag(mtag, ST_DEFINEFONTALIGNZONES); swf_FontSetAlignZones(mtag, iterator->swffont); @@ -3115,6 +3117,6 @@ static void swf_drawchar(gfxdevice_t*dev, gfxfont_t*font, int glyph, gfxcolor_t* } else { i->chardata = charbuffer_append(i->chardata, i->swffont, glyph, x, y, i->current_font_size, *(RGBA*)color, &i->fontmatrix); } - swf_FontUseGlyph(i->swffont, glyph); + swf_FontUseGlyph(i->swffont, glyph, i->current_font_size); return; }