X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Ffont2swf.c;h=972f2943084e17afb744fc427039ac6e299b77b5;hb=8589e0d1f5e47c05458033e750fd6182ca704fbe;hp=36ac40b0a2a78d01193b69ed94b671b2a6c71830;hpb=f0f4599a8cc05f18859d2bb8d0afe447f3e00813;p=swftools.git diff --git a/src/font2swf.c b/src/font2swf.c index 36ac40b..972f294 100644 --- a/src/font2swf.c +++ b/src/font2swf.c @@ -31,10 +31,12 @@ static char * destfilename = "output.swf"; static int all=0; static int verbose=0; static char * fontname = 0; +static char config_flashtype = 0; static struct options_t options[] = { {"h", "help"}, {"v", "verbose"}, +{"T", "flashtype"}, {"o", "output"}, {"V", "version"}, {0,0} @@ -54,6 +56,10 @@ int args_callback_option(char*name,char*val) verbose ++; return 0; } + else if(!strcmp(name, "T")) { + config_flashtype=1; + return 0; + } else if(!strcmp(name, "n")) { fontname = val; return 1; @@ -79,7 +85,6 @@ void args_callback_usage(char *name) printf("\n"); printf("-h , --help Print short help message and exit\n"); printf("-v , --verbose Be verbose. Use more than one -v for greater effect.\n"); - printf("-n , --name Name of the font (class) in the output file\n"); printf("-o , --output Write output to file .\n"); printf("-V , --version Print version info and exit\n"); printf("\n"); @@ -98,7 +103,8 @@ static void convertFont(char*infile, char*outfile) { SWFFONT * font; - font = swf_LoadFont(infile); + font = swf_LoadFont(infile, config_flashtype); + swf_FontCreateAlignZones(font); if(fontname) font->name = strdup(fontname);