#include <unistd.h>
#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;
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");
}
else
{ swf_ShapeFree(f->glyph[i].shape);
- f->ascii2glyph[f->glyph2ascii[i]] = -1;
+ f->ascii2glyph[f->glyph2ascii[i]] = -1;
f->glyph2ascii[i] = 0;
- f->glyph[i].shape = 0;
+ f->glyph[i].shape = NULL;
f->glyph[i].advance = 0;
}
} else f->ascii2glyph[f->glyph2ascii[i]] = -1;
{
t = swf_InsertTag(NULL,ST_SETBACKGROUNDCOLOR);
swf.firstTag = t;
- rgb.r = 0xff;
- rgb.g = 0xff;
- rgb.b = 0xff;
- swf_SetRGB(t,&rgb);
+ rgb.r = 0xff;
+ rgb.g = 0xff;
+ rgb.b = 0xff;
+ swf_SetRGB(t,&rgb);
t = swf_InsertTag(t,ST_DEFINEFONT);
}
else
swf_FontSetInfo(t,font);
if(!useDefineFont2)
- {
- int textscale = 400;
+ { int textscale = 400;
int s;
int xmax = 0;
int ymax = textscale * 20;
}
}
swf_SetU8(t,0);
+
- t = swf_InsertTag(t,ST_PLACEOBJECT2);
+ t = swf_InsertTag(t,ST_PLACEOBJECT2);
- swf_ObjectPlace(t,font->id+1,1,NULL,NULL,NULL);
+ swf_ObjectPlace(t,font->id+1,1,NULL,NULL,NULL);
- t = swf_InsertTag(t,ST_SHOWFRAME);
+ t = swf_InsertTag(t,ST_SHOWFRAME);
}
t = swf_InsertTag(t,ST_END);
int swf_FontSetDefine(TAG * t,SWFFONT * f);
int swf_FontSetInfo(TAG * t,SWFFONT * f);
+// the following two functions are obsolete and will be removed soon
int swf_FontExport(int handle,SWFFONT * f);
int swf_FontImport(int handle,SWFFONT * * f);