protected override void FormatTagElement(DefineFontAlignZonesTag tag, XElement xTag) { xTag.Add(new XAttribute(CSM_HINT_ATTRIB, (byte)tag.CsmTableHint)); if (tag.Reserved > 0) { xTag.Add(new XAttribute("reserved", tag.Reserved)); } var xZoneArrays = new XElement("zoneArrays"); foreach (var record in tag.ZoneTable) { xZoneArrays.Add(XZoneRecord.ToXml(record)); } xTag.Add(xZoneArrays); }
protected override bool AcceptTagElement(DefineFontAlignZonesTag tag, XElement element) { switch (element.Name.LocalName) { case ZONE_ARRAYS_ELEM: foreach (var xZoneArray in element.Elements()) { tag.ZoneTable.Add(XZoneRecord.FromXml(xZoneArray)); } break; default: return(false); } return(true); }