Esempio n. 1
0
        /**
        * Imports a font. The font name is looked up in the RtfDocumentHeader and
        * then the mapping from original font number to actual font number is added.
        *
        * @param fontNr The original font number.
        * @param fontName The font name to look up.
        * @param charset The characterset to use for the font.
        */
        public bool ImportFont(String fontNr, String fontName, String fontFamily, int charset)
        {
            RtfFont rtfFont = new RtfFont(fontName);

            if (charset>= 0)
                rtfFont.SetCharset(charset);
            if (fontFamily != null && fontFamily.Length > 0)
                rtfFont.SetFamily(fontFamily);
            rtfFont.SetRtfDocument(this.rtfDoc);
            this.importFontMapping[fontNr] = this.rtfDoc.GetDocumentHeader().GetFontNumber(rtfFont).ToString();
            return true;
        }
Esempio n. 2
0
 /**
 * Imports a font. The font name is looked up in the RtfDocumentHeader and
 * then the mapping from original font number to actual font number is added.
 *
 * @param fontNr The original font number.
 * @param fontName The font name to look up.
 */
 public bool ImportFont(String fontNr, String fontName)
 {
     RtfFont rtfFont = new RtfFont(fontName);
     if (rtfFont != null){
         rtfFont.SetRtfDocument(this.rtfDoc);
         this.importFontMapping[fontNr] = this.rtfDoc.GetDocumentHeader().GetFontNumber(rtfFont).ToString();
         return true;
     } else {
         return false;
     }
 }