/// <summary>
        /// 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.
        /// </summary>
        /// <param name="fontNr">The original font number.</param>
        /// <param name="fontName">The font name to look up.</param>
        public bool ImportFont(string fontNr, string fontName)
        {
            RtfFont rtfFont = new RtfFont(fontName);

            rtfFont.SetRtfDocument(_rtfDoc);
            _importFontMapping[fontNr] = _rtfDoc.GetDocumentHeader().GetFontNumber(rtfFont).ToString();
            return(true);
        }
Exemplo 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.
         * @param charset The characterset to use for the font.
         */
        public bool ImportFont(String fontNr, String fontName, int charset)
        {
            RtfFont rtfFont = new RtfFont(fontName);

            if (charset >= 0)
            {
                rtfFont.SetCharset(charset);
            }
            rtfFont.SetRtfDocument(this.rtfDoc);
            this.importFontMapping[fontNr] = this.rtfDoc.GetDocumentHeader().GetFontNumber(rtfFont).ToString();
            return(true);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 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.
        /// </summary>
        /// <param name="fontNr">The original font number.</param>
        /// <param name="fontName">The font name to look up.</param>
        /// <param name="charset">The characterset to use for the font.</param>
        public bool ImportFont(string fontNr, string fontName, int charset)
        {
            var rtfFont = new RtfFont(fontName);

            if (charset >= 0)
            {
                rtfFont.SetCharset(charset);
            }

            rtfFont.SetRtfDocument(_rtfDoc);
            _importFontMapping[fontNr] = _rtfDoc.GetDocumentHeader().GetFontNumber(rtfFont).ToString();
            return(true);
        }
Exemplo n.º 4
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);
            }
        }
        /// <summary>
        /// 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.
        /// </summary>
        /// <param name="fontNr">The original font number.</param>
        /// <param name="fontName">The font name to look up.</param>
        /// <param name="fontFamily"></param>
        /// <param name="charset">The characterset to use for the font.</param>
        public bool ImportFont(string fontNr, string fontName, string fontFamily, int charset)
        {
            RtfFont rtfFont = new RtfFont(fontName);

            if (charset >= 0)
            {
                rtfFont.SetCharset(charset);
            }
            if (!string.IsNullOrEmpty(fontFamily))
            {
                rtfFont.SetFamily(fontFamily);
            }
            rtfFont.SetRtfDocument(_rtfDoc);
            _importFontMapping[fontNr] = _rtfDoc.GetDocumentHeader().GetFontNumber(rtfFont).ToString();
            return(true);
        }
Exemplo n.º 6
0
 /// <summary>
 /// Sets the RtfDocument this RtfChunk belongs to.
 /// </summary>
 /// <param name="doc">The RtfDocument to use</param>
 public override void SetRtfDocument(RtfDocument doc)
 {
     base.SetRtfDocument(doc);
     _font.SetRtfDocument(Document);
 }