added --flashtype option to font2swf
authorMatthias Kramm <kramm@quiss.org>
Sun, 29 Nov 2009 19:47:13 +0000 (11:47 -0800)
committerMatthias Kramm <kramm@quiss.org>
Sun, 29 Nov 2009 19:47:13 +0000 (11:47 -0800)
lib/python/tags.c
src/font2swf.c

index 7fe35a4..455e87f 100644 (file)
@@ -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;
index 55c06cd..972f294 100644 (file)
@@ -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)