From: Matthias Kramm Date: Sun, 29 Nov 2009 19:47:13 +0000 (-0800) Subject: added --flashtype option to font2swf X-Git-Tag: version-0-9-1~227 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=a61b92b4ac72cd15ee0f3165f2e7a2f5ac00f156 added --flashtype option to font2swf --- diff --git a/lib/python/tags.c b/lib/python/tags.c index 7fe35a4..455e87f 100644 --- a/lib/python/tags.c +++ b/lib/python/tags.c @@ -49,7 +49,7 @@ static PyObject* f_DefineFont(PyObject* self, PyObject* args, PyObject* kwargs) if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|s", kwlist, &filename)) return NULL; - font = swf_LoadFont(filename); + font = swf_LoadFont(filename, 0); if(!font) { PyErr_SetString(PyExc_Exception, setError("Could not load %s", filename)); return NULL; diff --git a/src/font2swf.c b/src/font2swf.c index 55c06cd..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; @@ -97,7 +103,7 @@ static void convertFont(char*infile, char*outfile) { SWFFONT * font; - font = swf_LoadFont(infile); + font = swf_LoadFont(infile, config_flashtype); swf_FontCreateAlignZones(font); if(fontname)