X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=lib%2Fexample%2Fdumpfont.c;h=c6669bb0b0d02899bb9f57a72bdeba2b48b0340c;hb=71e57080c599ffd3ca6565e6b152a2f3fc137c62;hp=986f8531c036b1dc600e1244f8560f0c9d7d92ad;hpb=e028a6ae98c3b02bb56fab55d6bbe93905329ed5;p=swftools.git diff --git a/lib/example/dumpfont.c b/lib/example/dumpfont.c index 986f853..c6669bb 100644 --- a/lib/example/dumpfont.c +++ b/lib/example/dumpfont.c @@ -25,7 +25,7 @@ #include #include "../rfxswf.h" -#define PRINTABLE(a) ((a>='A')&&(a<='Z'))||((a>='a')&&(a<='z'))||((a>='0')&&(a<='9')) +#define PRINTABLE(a) (((a>0x20)&&(a<0xff)&&(a!='\\'))?a:0x20) SWF swf; @@ -74,7 +74,7 @@ void DumpFont(SWFFONT * f,char * name) if (f->glyph[i].shape) { printf(" addGlyph(f,%3i, 0x%02x,%4i, &Glyphs_%s[0x%04x],%4i); // %c\n", i, f->glyph2ascii[i], f->glyph[i].advance, name, gpos[i], - f->glyph[i].shape->bitlen,(i!='\\')?i:0x20); + f->glyph[i].shape->bitlen,PRINTABLE(f->glyph2ascii[i])); } printf(" return f;\n}\n\n");