/// <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); }
internal string GetFontName(XFont font, out PDFFont pdfFont) { pdfFont = _document.FontTable.GetFont(font); Debug.Assert(pdfFont != null); string name = Resources.AddFont(pdfFont); return(name); }
/// <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); }
string IContentStream.GetFontName(string idName, byte[] fontData, out PDFFont pdfFont) => GetFontName(idName, fontData, out pdfFont);
string IContentStream.GetFontName(XFont font, out PDFFont pdfFont) => GetFontName(font, out pdfFont);