Esempio n. 1
0
 /**
  * Writes the font definition
  */
 public virtual void WriteDefinition(Stream result)
 {
     byte[] t;
     result.Write(FONT_FAMILY, 0, FONT_FAMILY.Length);
     result.Write(FONT_CHARSET, 0, FONT_CHARSET.Length);
     result.Write(t = IntToByteArray(charset), 0, t.Length);
     result.Write(RtfElement.DELIMITER, 0, RtfElement.DELIMITER.Length);
     document.FilterSpecialChar(result, fontName, true, false);
 }
Esempio n. 2
0
 /// <summary>
 /// Writes the font definition
 /// </summary>
 public virtual void WriteDefinition(Stream result)
 {
     byte[] t;
     result.Write(_fontFamily, 0, _fontFamily.Length);
     result.Write(_fontCharset, 0, _fontCharset.Length);
     result.Write(t = IntToByteArray(_charset), 0, t.Length);
     result.Write(RtfElement.Delimiter, 0, RtfElement.Delimiter.Length);
     Document.FilterSpecialChar(result, _fontName, true, false);
 }
Esempio n. 3
0
        /**
         * Writes the font definition
         *
         * @return A byte array with the font definition
         */
        public virtual byte[] WriteDefinition()
        {
            MemoryStream result = new MemoryStream();

            byte[] t;
            try {
                result.Write(FONT_FAMILY, 0, FONT_FAMILY.Length);
                result.Write(FONT_CHARSET, 0, FONT_CHARSET.Length);
                result.Write(t = IntToByteArray(charset), 0, t.Length);
                result.Write(RtfElement.DELIMITER, 0, RtfElement.DELIMITER.Length);
                result.Write(t = DocWriter.GetISOBytes(document.FilterSpecialChar(fontName, true, false)), 0, t.Length);
            } catch (IOException) {
            }
            return(result.ToArray());
        }