typedef struct _SWFLAYOUT
{ U16 ascent;
U16 descent;
- S16 leading;
+ U16 leading;
SRECT * bounds;
U16 kerningcount;
SWFKERNING * kerning;
typedef struct _SWFFONT
{ int id; // -1 = not set
- U8 version; // 0 = not set, 1 = definefont, 2 = definefont2
+ U8 version; // 0 = not set, 1 = definefont, 2 = definefont2, 3 = definefont3
U8 * name;
SWFLAYOUT * layout;
int numchars;
U16 * glyph2ascii;
int * ascii2glyph;
+ int * glyph2glyph; // only if the font is resorted
SWFGLYPH * glyph;
ALIGNZONE * alignzones;
U8 alignzone_flags;
void swf_FontUsePair(SWFFONT * f, int char1, int char2);
int swf_FontUseGetPair(SWFFONT * f, int char1, int char2);
int swf_FontUseAll(SWFFONT* f);
-int swf_FontUseUTF8(SWFFONT * f, U8 * s, U16 size);
+int swf_FontUseUTF8(SWFFONT * f, const U8 * s, U16 size);
int swf_FontUse(SWFFONT* f,U8 * s);
+void swf_FontSort(SWFFONT * font);
int swf_FontSetDefine(TAG * t,SWFFONT * f);
int swf_FontSetDefine2(TAG * t,SWFFONT * f);
// swffont.c
-SWFFONT* swf_LoadTrueTypeFont(const char*filename);
+SWFFONT* swf_LoadTrueTypeFont(const char*filename, char flashtype);
SWFFONT* swf_LoadT1Font(const char*filename);
-SWFFONT* swf_LoadFont(const char*filename);
+SWFFONT* swf_LoadFont(const char*filename, char flashtype);
void swf_SetLoadFontParameters(int scale, int skip_unused, int full_unicode);
RGBA* swf_DefineLosslessBitsTagToImage(TAG*tag, int*width, int*height);
RGBA* swf_ExtractImage(TAG*tag, int*dwidth, int*dheight);
-RGBA* swf_ImageScale(RGBA*data, int width, int height, int newwidth, int newheight);
TAG* swf_AddImage(TAG*tag, int bitid, RGBA*mem, int width, int height, int quality);
// swfsound.c