/// <summary> /// Writes the definition of the font list /// </summary> public virtual void WriteDefinition(Stream result) { byte[] t; result.Write(_defaultFont, 0, _defaultFont.Length); result.Write(t = IntToByteArray(0), 0, t.Length); result.Write(OpenGroup, 0, OpenGroup.Length); result.Write(_fontTable, 0, _fontTable.Length); for (int i = 0; i < _fontList.Count; i++) { result.Write(OpenGroup, 0, OpenGroup.Length); result.Write(FontNumber, 0, FontNumber.Length); result.Write(t = IntToByteArray(i), 0, t.Length); RtfFont rf = (RtfFont)_fontList[i]; rf.WriteDefinition(result); result.Write(CommaDelimiter, 0, CommaDelimiter.Length); result.Write(CloseGroup, 0, CloseGroup.Length); } result.Write(CloseGroup, 0, CloseGroup.Length); Document.OutputDebugLinebreak(result); }
/** * Writes the definition of the font list */ public virtual void WriteDefinition(Stream result) { byte[] t; result.Write(DEFAULT_FONT, 0, DEFAULT_FONT.Length); result.Write(t = IntToByteArray(0), 0, t.Length); result.Write(OPEN_GROUP, 0, OPEN_GROUP.Length); result.Write(FONT_TABLE, 0, FONT_TABLE.Length); for (int i = 0; i < fontList.Count; i++) { result.Write(OPEN_GROUP, 0, OPEN_GROUP.Length); result.Write(FONT_NUMBER, 0, FONT_NUMBER.Length); result.Write(t = IntToByteArray(i), 0, t.Length); RtfFont rf = (RtfFont)fontList[i]; rf.WriteDefinition(result); result.Write(COMMA_DELIMITER, 0, COMMA_DELIMITER.Length); result.Write(CLOSE_GROUP, 0, CLOSE_GROUP.Length); } result.Write(CLOSE_GROUP, 0, CLOSE_GROUP.Length); this.document.OutputDebugLinebreak(result); }