X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswftext.c;h=9297be9e1468a59096bb3f8f132f2a98c3398b0d;hb=f908dd0674bc6cd66e73cd73f9d8073a992f0528;hp=dc7aead611ce2a726128f9dad7305ec8fe90bf41;hpb=ac01acb114280085987db02ecdd7d0608a5c2a67;p=swftools.git diff --git a/lib/modules/swftext.c b/lib/modules/swftext.c index dc7aead..9297be9 100644 --- a/lib/modules/swftext.c +++ b/lib/modules/swftext.c @@ -46,7 +46,7 @@ int swf_FontEnumerate(SWF * swf,void (*FontCallback) (U16,U8*)) n = 0; while (t) - { if (swf_GetTagID(t)==ST_DEFINEFONTINFO || + { if (swf_GetTagID(t)==ST_DEFINEFONTINFO || swf_GetTagID(t)==ST_DEFINEFONTINFO2 || swf_GetTagID(t)==ST_DEFINEFONT2) { n++; if (FontCallback) @@ -114,9 +114,10 @@ int swf_FontExtract_DefineFontInfo(int id,SWFFONT * f,TAG * t) int i; if(f->version>1) { - // DefineFont2 doesn't have FontInfo fields - fprintf(stderr, "fixme: FontInfo field for DefineFont2 encountered\n"); - return -1; + /* Especially with Flash MX, DefineFont2 may have FontInfo fields, + too. However, they only add little information to what's already + inside the DefineFont2 tag */ + return id; } if (l) @@ -143,6 +144,10 @@ int swf_FontExtract_DefineFontInfo(int id,SWFFONT * f,TAG * t) if(flags & 32) f->encoding |= FONT_ENCODING_UNICODE; + if(t->id == ST_DEFINEFONTINFO2) { + f->language = swf_GetU8(t); + } + f->glyph2ascii = (U16*)malloc(sizeof(U16)*f->numchars); maxcode = 0; for(i=0; i < f->numchars; i++) {