From: kramm Date: Mon, 5 Nov 2001 12:49:19 +0000 (+0000) Subject: added routine for dumping fonts. X-Git-Tag: release-0-1-2~52 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=97bcfc9c0f3ae2e2b52700090d6816d2326fdbf2 added routine for dumping fonts. --- diff --git a/lib/modules/swfdump.c b/lib/modules/swfdump.c index ee187f9..ffed0f9 100644 --- a/lib/modules/swfdump.c +++ b/lib/modules/swfdump.c @@ -37,6 +37,24 @@ void swf_DumpTag(FILE * f,TAG * t) fprintf(f,"\n"); } +void swf_DumpFont(SWFFONT * font) +{ + printf("ID: %d\n", font->id); + printf("Version: %d\n", font->version); + printf("name: %s\n", font->name); + printf("characters: %d\n", font->numchars); + printf("layout: %s\n", font->layout?"yes":"no"); + if(font->layout) + { + printf(" ascent:%d\n", font->layout->ascent); + printf(" descent:%d\n", font->layout->descent); + printf(" leading:%d\n", font->layout->leading); + printf(" bounds: (not shown)\n"); + printf(" kerning records:%d\n", font->layout->kerningcount); + printf(" kerning records: (not shown)\n"); + } +} + char* swf_TagGetName(TAG*tag) { switch(tag->id)