X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fdevices%2Fswf.c;h=5f0fe70f9ad6ebbcd14202b2b433d08de9dd222a;hb=a52eae660658ae99a325993a7d7bb373b03d6df0;hp=a3f57e9add05d376726f8c2eec7a7bab57d96b65;hpb=e633c982297e1728e8373f80d25533776a9b92b0;p=swftools.git diff --git a/lib/devices/swf.c b/lib/devices/swf.c index a3f57e9..5f0fe70 100644 --- a/lib/devices/swf.c +++ b/lib/devices/swf.c @@ -114,6 +114,7 @@ typedef struct _swfoutput_internal int config_bboxvars; int config_disable_polygon_conversion; int config_normalize_polygon_positions; + int config_alignfonts; char config_disablelinks; RGBA config_linkcolor; float config_minlinewidth; @@ -738,12 +739,6 @@ static void chararray_writetotag(chararray_t*_chardata, TAG*tag) lastx = chr->x; lasty = chr->y; lastsize = chr->size; - } else { - assert(lastchar>=0); - if(pass==1 && lastchar!=chr->charid) { - swf_FontUsePair(chr->font, lastchar, chr->charid); - swf_FontUsePair(chr->font, chr->charid, lastchar); - } } if(islast) @@ -1476,13 +1471,10 @@ 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); @@ -1495,19 +1487,19 @@ void swfoutput_finalize(gfxdevice_t*dev) } else { mtag = swf_InsertTag(mtag, ST_DEFINEFONT3); swf_FontSetDefine2(mtag, iterator->swffont); - if(iterator->swffont->alignzones) { - mtag = swf_InsertTag(mtag, ST_DEFINEFONTALIGNZONES); - swf_FontSetAlignZones(mtag, iterator->swffont); - } } } } iterator = iterator->next; } - + i->tag = swf_InsertTag(i->tag,ST_END); TAG* tag = i->tag->prev; + + if(use_font3 && i->config_storeallcharacters && i->config_alignfonts) { + swf_FontPostprocess(i->swf); // generate alignment information + } /* remove the removeobject2 tags between the last ST_SHOWFRAME and the ST_END- they confuse the flash player */