X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfdump.c;h=99917eb177199a2143503622323c914f59fd99fd;hb=dc9b35f738dc7d93b219c120523e91021dbf2439;hp=c9ca3954b9d7f11e8e5a8252303c759d6aef87e2;hpb=427ac5a71a17b9df0bd2d9893fa29fc98b8019e6;p=swftools.git diff --git a/src/swfdump.c b/src/swfdump.c index c9ca395..99917eb 100644 --- a/src/swfdump.c +++ b/src/swfdump.c @@ -70,6 +70,7 @@ static struct options_t options[] = { {"a", "action"}, {"t", "text"}, {"s", "shapes"}, +{"F", "fonts"}, {"p", "placements"}, {"b", "bbox"}, {"X", "width"}, @@ -176,6 +177,7 @@ void args_callback_usage(char *name) printf("-a , --action Disassemble action tags\n"); printf("-t , --text Show text fields (like swfstrings).\n"); printf("-s , --shapes Show shape coordinates/styles\n"); + printf("-F , --fonts Show font information\n"); printf("-p , --placements Show placement information\n"); printf("-b , --bbox Print tag's bounding boxes\n"); printf("-X , --width Prints out a string of the form \"-X width\".\n"); @@ -286,7 +288,8 @@ void dumpFont(TAG*tag, char*prefix) printf("%slanguage: %02x\n", prefix,font->language); int t; for(t=0;tnumchars;t++) { - printf("%s== Glyph %d: advance=%d ==\n", prefix, t, font->glyph[t].advance); + int u = font->glyph2ascii?font->glyph2ascii[t]:-1; + printf("%s== Glyph %d: advance=%d encoding=%d ==\n", prefix, t, font->glyph[t].advance, u); SHAPE2* shape = swf_ShapeToShape2(font->glyph[t].shape); SHAPELINE*line = shape->lines; @@ -1245,7 +1248,7 @@ int main (int argc,char ** argv) } else if(tag->id == ST_PLACEOBJECT2 || tag->id == ST_PLACEOBJECT3) { } - else if(tag->id == ST_NAMECHARACTER) { + else if(tag->id == ST_NAMECHARACTER || tag->id==ST_DEFINEFONTNAME) { swf_GetU16(tag); printf(" \"%s\"\n", swf_GetString(tag)); } @@ -1280,7 +1283,7 @@ int main (int argc,char ** argv) if(tag->len) dumperror("End Tag not empty"); } - else if(tag->id == ST_EXPORTASSETS) { + else if(tag->id == ST_EXPORTASSETS || tag->id == ST_SYMBOLCLASS) { handleExportAssets(tag, myprefix); } else if(tag->id == ST_DOACTION && action) { @@ -1309,6 +1312,13 @@ int main (int argc,char ** argv) else if(tag->id == ST_PLACEOBJECT2 || tag->id == ST_PLACEOBJECT3) { handlePlaceObject23(tag, myprefix); } + else if(tag->id == ST_DEFINEFONTNAME) { + swf_SetTagPos(tag, 0); + swf_GetU16(tag); //id + swf_GetString(tag); //name + char* copyright = swf_GetString(tag); + printf("%s%s\n", myprefix, copyright); + } else if(tag->id == ST_DEFINESHAPE || tag->id == ST_DEFINESHAPE2 || tag->id == ST_DEFINESHAPE3 ||