public void serialize(LittleEndianOutput out) {out.writeShort(getFontHeight());out.writeShort(getAttributes());out.writeShort(getColorPaletteIndex());out.writeShort(getBoldWeight());out.writeShort(getSuperSubScript());out.writeByte(getUnderline());out.writeByte(getFamily());out.writeByte(getCharset());out.writeByte(field_9_zero);int fontNameLen = field_11_font_name.length();out.writeByte(fontNameLen);boolean hasMultibyte = StringUtil.hasMultibyte(field_11_font_name);out.writeByte(hasMultibyte ? 0x01 : 0x00);if (fontNameLen > 0) {if (hasMultibyte) {StringUtil.putUnicodeLE(field_11_font_name, out);} else {StringUtil.putCompressedUnicode(field_11_font_name, out);}}}
public override void Serialize(ILittleEndianOutput out1){out1.WriteShort(FontHeight);out1.WriteShort(Attributes);out1.WriteShort(ColorPaletteIndex);out1.WriteShort(BoldWeight);out1.WriteShort((int) SuperSubScript);out1.WriteByte((int) Underline);out1.WriteByte(Family);out1.WriteByte(Charset);out1.WriteByte(field_9_zero);int fontNameLen = field_11_font_name.Length;out1.WriteByte(fontNameLen);bool hasMultibyte = StringUtil.HasMultibyte(field_11_font_name);out1.WriteByte(hasMultibyte ? 0x01 : 0x00);if (fontNameLen > 0){if (hasMultibyte){StringUtil.PutUnicodeLE(field_11_font_name, out1);}else{StringUtil.PutCompressedUnicode(field_11_font_name, out1);}}}