X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Ffont2swf.c;h=cd30118109dfccecd09f0ef044ad83fc4feef8c9;hb=8978b24a969f73518ecde87b24d972c7030e91f6;hp=3eee8447fa5ee37682068ab243ef76bf631b2ccc;hpb=918a290574399a88456bbc70d7064c04ab8f6819;p=swftools.git diff --git a/src/font2swf.c b/src/font2swf.c index 3eee844..cd30118 100644 --- a/src/font2swf.c +++ b/src/font2swf.c @@ -30,6 +30,7 @@ static char * filename = 0; static char * destfilename = "output.swf"; static int all=0; static int verbose=0; +static char * fontname = 0; static struct options_t options[] = { {"h", "help"}, @@ -53,6 +54,10 @@ int args_callback_option(char*name,char*val) verbose ++; return 0; } + else if(!strcmp(name, "n")) { + fontname = val; + return 1; + } else if(!strcmp(name, "a")) { all = 1; return 0; @@ -94,6 +99,9 @@ static void convertFont(char*infile, char*outfile) font = swf_LoadFont(infile); + if(fontname) + font->name = strdup(fontname); + swf_WriteFont(font, outfile); swf_FontFree(font); }