From a61b92b4ac72cd15ee0f3165f2e7a2f5ac00f156 Mon Sep 17 00:00:00 2001 From: Matthias Kramm Date: Sun, 29 Nov 2009 11:47:13 -0800 Subject: [PATCH] added --flashtype option to font2swf --- lib/python/tags.c | 2 +- src/font2swf.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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) -- 1.7.10.4