+void swf_LayoutFree(SWFLAYOUT * l)
+{
+ if (l) {
+ if (l->kerning)
+ rfx_free(l->kerning);
+ l->kerning = NULL;
+ if (l->bounds)
+ rfx_free(l->bounds);
+ l->bounds = NULL;
+ }
+ rfx_free(l);
+}
+
+
+static void font_freeglyphnames(SWFFONT*f)
+{
+ if (f->glyphnames) {
+ int t;
+ for (t = 0; t < f->numchars; t++) {
+ if (f->glyphnames[t])
+ rfx_free(f->glyphnames[t]);
+ }
+ rfx_free(f->glyphnames);
+ f->glyphnames = 0;
+ }
+
+}
+static void font_freeusage(SWFFONT*f)
+{
+ if (f->use) {
+ if(f->use->chars) {
+ rfx_free(f->use->chars);f->use->chars = 0;
+ }
+ rfx_free(f->use); f->use = 0;
+ }
+}
+static void font_freelayout(SWFFONT*f)
+{
+ if (f->layout) {
+ swf_LayoutFree(f->layout);
+ f->layout = 0;
+ }
+}
+static void font_freename(SWFFONT*f)
+{
+ if (f->name) {
+ rfx_free(f->name);
+ f->name = 0;
+ }
+}
+
+int swf_FontReduce(SWFFONT * f)