public FontParser(IImageParser parser, ColorChip colorChip, FontChip fontChip) : base(parser, colorChip, fontChip) { this.fontChip = fontChip; // imageParser.ReadStream(); name = parser.FileName.Split('.').First(); }
public FontParser(IImageParser imageParser, IEngineChips chips, string name = "Default") : base(imageParser, chips, true, chips.fontChip) { fontChip = chips.fontChip; this.name = name; }
private void SerializeFontChip(FontChip fontChip) { if (fontChip.export == false) { return; } JsonUtil.GetLineBreak(sb); sb.Append("\"FontChip\":"); JsonUtil.GetLineBreak(sb); sb.Append("{"); JsonUtil.GetLineBreak(sb, 1); // Mode sb.Append("\"unique\":"); sb.Append(fontChip.unique.ToString().ToLower()); sb.Append(","); JsonUtil.GetLineBreak(sb, 1); sb.Append("\"pages\":"); sb.Append(fontChip.pages); JsonUtil.GetLineBreak(sb); sb.Append("}"); sb.Append(","); currentStep++; }
public FontParser(IImageParser imageParser, IEngineChips chips, string name = "Default") : base(imageParser, chips) { fontChip = chips.fontChip; if (fontChip == null) { // Create a new font chip to store data fontChip = new FontChip(); chips.chipManager.ActivateChip(fontChip.GetType().FullName, fontChip); } // this.autoImport = autoImport; this.name = name; }
public FontParser(ITexture2D tex, IEngineChips chips, string name = "Default", bool autoImport = true) : base(tex, chips) { fontChip = chips.fontChip; if (fontChip == null) { // Create a new font chip to store data fontChip = new FontChip(); chips.chipManager.ActivateChip(fontChip.GetType().FullName, fontChip); } this.autoImport = autoImport; this.name = name; }
private void SerializeFontChip(FontChip fontChip) { if (fontChip.export == false) { return; } JsonUtil.GetLineBreak(sb); sb.Append("\"FontChip\":"); JsonUtil.GetLineBreak(sb); sb.Append("{"); JsonUtil.GetLineBreak(sb); sb.Append("}"); sb.Append(","); currentStep++; }