예제 #1
0
        /// <summary>
        /// Gets the resource name of the specified font data within this form XObject.
        /// </summary>
        internal string GetFontName(string idName, byte[] fontData, out PDFFont pdfFont)
        {
            pdfFont = _document.FontTable.GetFont(idName, fontData);
            Debug.Assert(pdfFont != null);
            string name = Resources.AddFont(pdfFont);

            return(name);
        }
예제 #2
0
        internal string GetFontName(XFont font, out PDFFont pdfFont)
        {
            pdfFont = _document.FontTable.GetFont(font);
            Debug.Assert(pdfFont != null);
            string name = Resources.AddFont(pdfFont);

            return(name);
        }
예제 #3
0
 /// <summary>
 /// Adds the specified font to this resource dictionary and returns its local resource name.
 /// </summary>
 public string AddFont(PDFFont font)
 {
     if (!_resources.TryGetValue(font, out string name))
     {
         name             = NextFontName;
         _resources[font] = name;
         if (font.Reference == null)
         {
             Owner.IrefTable.Add(font);
         }
         Fonts.Elements[name] = font.Reference;
     }
     return(name);
 }
예제 #4
0
 string IContentStream.GetFontName(string idName, byte[] fontData, out PDFFont pdfFont) => GetFontName(idName, fontData, out pdfFont);
예제 #5
0
 string IContentStream.GetFontName(XFont font, out PDFFont pdfFont) => GetFontName(font, out pdfFont);