+ dict_put(&textures, name, texture);
+}
+
+void s_createfont(const char*name, const char*filename, const char*glyphs, char flashtype)
+{
+ if(dict_lookup(&fonts, name))
+ syntaxerror("font %s defined twice", name);
+
+ SWFFONT* font = swf_LoadFont(filename, flashtype);
+ if(font == 0) {
+ warning("Couldn't open font file \"%s\"", filename);
+ font = (SWFFONT*)malloc(sizeof(SWFFONT));
+ memset(font, 0, sizeof(SWFFONT));
+ dict_put(&fonts, name, font);
+ return;
+ }
+ swf_FontPrepareForEditText(font);
+
+ if(!strcmp(glyphs, "all")) {
+ swf_FontUseAll(font);
+ font->use->glyphs_specified = 1;
+ } else {
+ if(!glyphs[0]) {
+ swf_FontInitUsage(font);
+ } else {
+ swf_FontUseUTF8(font, (const U8*)glyphs, 0xffff);
+ font->use->glyphs_specified = 1;
+ }
+ }
+ dict_put(&fonts, name, font);