X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfdump.c;h=038104b4f76bc0d7c0e71faf1d8f3d141fdad3bb;hb=f567c3e994871f6e95299f9365b1060f7ee81223;hp=95b06f61d2d80357b2c30ea0e24da4bd1b90a9bc;hpb=d9872c4e9c1c252d74d380d114eeb769c043e013;p=swftools.git diff --git a/src/swfdump.c b/src/swfdump.c index 95b06f6..038104b 100644 --- a/src/swfdump.c +++ b/src/swfdump.c @@ -247,10 +247,10 @@ SWF swf; int fontnum = 0; SWFFONT**fonts; -void textcallback(int*glyphs, int nr, int fontid) +void textcallback(void*self, int*glyphs, int*ypos, int nr, int fontid, int fontsize, int startx, int starty, RGBA*color) { int font=-1,t; - printf(" <%2d glyphs in font %2d> ",nr, fontid); + printf(" <%2d glyphs in font %2d, color #%02x%02x%02x%02x> ",nr, fontid, color->r, color->g, color->b, color->a); for(t=0;tid == fontid) { @@ -265,9 +265,9 @@ void textcallback(int*glyphs, int nr, int fontid) if(font>=0) { if(glyphs[t] >= fonts[font]->numchars /*glyph is in range*/ || !fonts[font]->glyph2ascii /* font has ascii<->glyph mapping */ - ) - continue; - a = fonts[font]->glyph2ascii[glyphs[t]]; + ) a = glyphs[t]; + else + a = fonts[font]->glyph2ascii[glyphs[t]]; } else { a = glyphs[t]; } @@ -282,7 +282,7 @@ void textcallback(int*glyphs, int nr, int fontid) void handleText(TAG*tag) { printf("\n"); - swf_FontExtract_DefineTextCallback(-1,0,tag,4, textcallback); + swf_ParseDefineText(tag,textcallback, 0); } void handleDefineSound(TAG*tag) @@ -994,8 +994,13 @@ int main (int argc,char ** argv) swf_GetUsedIDs(tag, used); printf("%s%suses IDs: ", indent, prefix); for(t=0;t