public static void SaveAsBMFont(string filename, File.Font f) { BMFontWriter writer = new BMFontWriter(); writer.sw = new StreamWriter(filename); writer.WriteInfoTag(f); writer.WriteCommon(f); writer.WritePage(filename, f); writer.WriteChars(f); writer.sw.Flush(); writer.sw.Close(); }