public void WriteText(TextWriter textWriter, int id) { TextFormatUtility.WriteInt("id", id, textWriter); TextFormatUtility.WriteInt("x", X, textWriter); TextFormatUtility.WriteInt("y", Y, textWriter); TextFormatUtility.WriteInt("width", Width, textWriter); TextFormatUtility.WriteInt("height", Height, textWriter); TextFormatUtility.WriteInt("xoffset", XOffset, textWriter); TextFormatUtility.WriteInt("yoffset", YOffset, textWriter); TextFormatUtility.WriteInt("xadvance", XAdvance, textWriter); TextFormatUtility.WriteInt("page", Page, textWriter); TextFormatUtility.WriteEnum("chnl", Channel, textWriter); }
public void WriteText(TextWriter textWriter, int pages) { TextFormatUtility.WriteInt("lineHeight", LineHeight, textWriter); TextFormatUtility.WriteInt("base", Base, textWriter); TextFormatUtility.WriteInt("scaleW", ScaleWidth, textWriter); TextFormatUtility.WriteInt("scaleH", ScaleHeight, textWriter); TextFormatUtility.WriteInt("pages", pages, textWriter); TextFormatUtility.WriteBool("packed", Packed, textWriter); TextFormatUtility.WriteEnum("alphaChnl", AlphaChannel, textWriter); TextFormatUtility.WriteEnum("redChnl", RedChannel, textWriter); TextFormatUtility.WriteEnum("greenChnl", GreenChannel, textWriter); TextFormatUtility.WriteEnum("blueChnl", BlueChannel, textWriter); }
public void WriteText(TextWriter textWriter) { TextFormatUtility.WriteString("face", Face ?? string.Empty, textWriter); TextFormatUtility.WriteInt("size", Size, textWriter); TextFormatUtility.WriteBool("bold", Bold, textWriter); TextFormatUtility.WriteBool("italic", Italic, textWriter); TextFormatUtility.WriteString("charset", Charset ?? string.Empty, textWriter); TextFormatUtility.WriteBool("unicode", Unicode, textWriter); TextFormatUtility.WriteInt("stretchH", StretchHeight, textWriter); TextFormatUtility.WriteBool("smooth", Smooth, textWriter); TextFormatUtility.WriteInt("aa", SuperSamplingLevel, textWriter); var padding = $"{PaddingUp},{PaddingRight},{PaddingDown},{PaddingLeft}"; TextFormatUtility.WriteValue("padding", padding, textWriter); var spacing = $"{SpacingHorizontal},{SpacingVertical}"; TextFormatUtility.WriteValue("spacing", spacing, textWriter); TextFormatUtility.WriteInt("outline", Outline, textWriter); }
public void WriteText(TextWriter textWriter, int amount) { TextFormatUtility.WriteInt("first", First, textWriter); TextFormatUtility.WriteInt("second", Second, textWriter); TextFormatUtility.WriteInt("amount", amount, textWriter); }
public void WriteText(TextWriter textWriter) { // Info if (Info != null) { textWriter.Write("info"); Info.WriteText(textWriter); textWriter.WriteLine(); } // Common if (Common != null) { textWriter.Write("common"); Common.WriteText(textWriter, Pages.Count); textWriter.WriteLine(); } // Pages if (Pages != null) { foreach (var page in Pages) { textWriter.Write("page"); TextFormatUtility.WriteInt("id", page.Key, textWriter); TextFormatUtility.WriteString("file", page.Value, textWriter); textWriter.WriteLine(); } } // Characters if (Characters != null) { textWriter.Write("chars"); TextFormatUtility.WriteInt("count", Characters.Count, textWriter); textWriter.WriteLine(); foreach (var keyValuePair in Characters) { textWriter.Write("char"); keyValuePair.Value.WriteText(textWriter, keyValuePair.Key); textWriter.WriteLine(); } } // Kernings if (KerningPairs != null && KerningPairs.Count > 0) { textWriter.Write("kernings"); TextFormatUtility.WriteInt("count", KerningPairs.Count, textWriter); textWriter.WriteLine(); foreach (var keyValuePair in KerningPairs) { textWriter.Write("kerning"); keyValuePair.Key.WriteText(textWriter, keyValuePair.Value); textWriter.WriteLine(); } } }