API Reference
Class
PdfEmbeddedFontFamily
Represents a caller-supplied TrueType font family used by generated PDF text.
Inheritance
- Object
- PdfEmbeddedFontFamily
Usage
Explore 11 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 4
Accepted by parameters 7
Constructors
public PdfEmbeddedFontFamily(String familyName, Byte[] regular, Byte[]? bold = null, Byte[]? italic = null, Byte[]? boldItalic = null) #Creates a reusable TrueType font family from font file bytes.
Parameters
- familyName System.String
- Family name used for generated PDF font resource names.
- regular System.Byte[]
- Regular TrueType face bytes.
- bold System.Byte[]? = null
- Optional bold TrueType face bytes. When null, the regular face is reused.
- italic System.Byte[]? = null
- Optional italic TrueType face bytes. When null, generated italic text uses a slanted regular face.
- boldItalic System.Byte[]? = null
- Optional bold-italic TrueType face bytes. When null, generated text uses the best supplied face and simulates the missing slant when needed.
Methods
public static PdfEmbeddedFontFamily FromFiles(String familyName, String regularPath, String? boldPath = null, String? italicPath = null, String? boldItalicPath = null) #Returns:
PdfEmbeddedFontFamilyCreates a reusable TrueType font family from font files on disk.
Parameters
- familyName System.String
- regularPath System.String
- boldPath System.String? = null
- italicPath System.String? = null
- boldItalicPath System.String? = null
public static PdfEmbeddedFontFamily FromSystem(String familyName, String? pdfFamilyName = null) #Returns:
PdfEmbeddedFontFamilyLoads an installed TrueType font family from common operating-system font folders.
Parameters
- familyName System.String
- Installed family name, for example Arial, Segoe UI, or DejaVu Sans.
- pdfFamilyName System.String? = null
- Optional family name to expose in generated PDF font resource names.
Returns
A reusable embedded font family backed by the discovered TrueType faces.
Exceptions
FileNotFoundException– No embeddable TrueType regular face was found for familyName.
public static Boolean TryFromSystem(String familyName, out PdfEmbeddedFontFamily? fontFamily, String? pdfFamilyName = null) #Returns:
BooleanAttempts to load an installed TrueType font family from common operating-system font folders.
Parameters
- familyName System.String
- Installed family name, for example Arial, Segoe UI, or DejaVu Sans.
- fontFamily OfficeIMO.Pdf.PdfEmbeddedFontFamily?
- When found, receives a reusable embedded font family backed by discovered TrueType faces.
- pdfFamilyName System.String? = null
- Optional family name to expose in generated PDF font resource names.
Returns
true when an embeddable regular TrueType face was found; otherwise false.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?