X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfc.c;h=14d5f9a90ce360a91859a7e5844913475f0ad271;hb=32bce7795076522c72a9c7f5720a6774f5f8223c;hp=b1b595246cd47e6a4b6599addd7a84a93c039143;hpb=ddfcceee879947e62e3482313ad81b04085917ed;p=swftools.git diff --git a/src/swfc.c b/src/swfc.c index b1b5952..14d5f9a 100644 --- a/src/swfc.c +++ b/src/swfc.c @@ -1546,7 +1546,7 @@ void s_font(char*name, char*filename) swf_FontCreateLayout(font); } font->id = id; - swf_FontReduce_swfc(font); + swf_FontReduce_swfc(font); tag = swf_InsertTag(tag, ST_DEFINEFONT2); swf_FontSetDefine2(tag, font); tag = swf_InsertTag(tag, ST_EXPORTASSETS); @@ -4289,6 +4289,7 @@ static void analyseArgumentsForCommand(char*command) map_t args; char* fontfile; int nr = -1; + U8* glyphs_to_include; msg(" analyse Command: %s (line %d)", command, line); for(t=0;tuse->glyphs_specified = 1; + } + else + { + if (strcmp (glyphs_to_include, "")) + { + swf_FontUseUTF8(font, glyphs_to_include); + font->use->glyphs_specified = 1; + } + else + swf_FontInitUsage(font); + } + } dictionary_put2(&fonts, name, font); } else @@ -4328,10 +4347,16 @@ static void analyseArgumentsForCommand(char*command) if (!font) syntaxerror("font %s is not known in line %d", lu(&args, "font"), line); else - if (!strcmp(command, "edittext")) - swf_FontUseAll(font); - else - swf_FontUseUTF8(font, lu(&args, "text")); + if (font->use && !font->use->glyphs_specified) + { + if (!strcmp(command, "edittext")) + { + swf_FontUseAll(font); + font->use->glyphs_specified = 1; + } + else + swf_FontUseUTF8(font, lu(&args, "text")); + } } map_clear(&args); return;