} TAG, * LPTAG;
+#define swf_ResetReadBits(tag) if (tag->readBit) { tag->pos++; tag->readBit = 0; }
+#define swf_ResetWriteBits(tag) if (tag->writeBit) { tag->writeBit = 0; }
+
typedef struct _SOUNDINFO
{
U8 stop;
int swf_FontReduce(SWFFONT * f,FONTUSAGE * use);
int swf_FontInitUsage(SWFFONT * f,FONTUSAGE * use);
-int swf_FontUse(FONTUSAGE * use,U8 * s);
+int swf_FontUse(SWFFONT* f,FONTUSAGE * use,U8 * s);
int swf_FontSetDefine(TAG * t,SWFFONT * f);
int swf_FontSetDefine2(TAG * t,SWFFONT * f);
int swf_TextPrintDefineText(TAG * t,SWFFONT * f);
// Prints text defined in tag t with font f to stdout
-/* notice: if you set the fontid, make sure the corresponding font has layout information */
+void swf_FontPrepareForEditText(SWFFONT * f);
+
+/* notice: if you set the fontid, make sure you call swf_FontPrepareForEditText() for the font first */
void swf_SetEditText(TAG*tag, U16 flags, SRECT r, char*text, RGBA*color,
int maxlength, U16 font, U16 height, EditTextLayout*layout, char*variable);
SRECT swf_SetDefineText(TAG*tag, SWFFONT*font, RGBA*rgb, char*text, int scale);
-void swf_DrawText(drawer_t*draw, SWFFONT*font, char*text);
+void swf_DrawText(drawer_t*draw, SWFFONT*font, int size, char*text);
// swffont.c
SWFFONT* swf_LoadT1Font(char*filename);
SWFFONT* swf_LoadFont(char*filename);
+void swf_SetLoadFontParameters(int scale, int skip_unused);
+
// swfdump.c
void swf_DumpHeader(FILE * f,SWF * swf);