Class
PdfEmbeddedFontFamily
OfficeIMO.Pdf
Represents a caller-supplied TrueType font family used by generated PDF text.
Inheritance
- object
- PdfEmbeddedFontFamily
Usage
Explore 14 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 5
Accepted by parameters 9
- Method PdfAFontSubstitution.Supplied
- Method PdfCreateOptions.RegisterFontFamily
- Method PdfCreateOptions.RegisterNamedFontFamily
- Method PdfCreateOptions.UseFontFamily
- Constructor PdfEmbeddedFontFallbackCandidate.PdfEmbeddedFontFallbackCandidate
- Method PdfEmbeddedFontFamily.TryFromSystem
- Method PdfFormFillerOptions.UseAppearanceFontFamily
- Method PdfPageBuilder.UseFontFamily
- Method PdfTextStyleBuilder.FontFamily
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 string
- Family name used for generated PDF font resource names.
- regular byte[]
- Regular TrueType face bytes.
- bold byte[]? = null
- Optional bold TrueType face bytes. When null, the selected regular face is emboldened while painting.
- italic byte[]? = null
- Optional italic TrueType face bytes. When null, generated italic text uses a slanted regular face.
- boldItalic 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) #Creates a reusable TrueType font family from font files on disk.
Parameters
- familyName string
- regularPath string
- boldPath string? = null
- italicPath string? = null
- boldItalicPath string? = null
Returns
PdfEmbeddedFontFamilypublic static PdfEmbeddedFontFamily FromSystem(string familyName, string? pdfFamilyName = null) #Loads an installed TrueType font family from common operating-system font folders.
Parameters
- familyName string
- Installed family name, for example Arial, Segoe UI, or DejaVu Sans.
- pdfFamilyName string? = null
- Optional family name to expose in generated PDF font resource names.
Returns
PdfEmbeddedFontFamily A reusable embedded font family backed by the discovered TrueType faces.Exceptions
FileNotFoundException– No embeddable TrueType regular face was found for familyName.
public static bool TryFromSystem(string familyName, out PdfEmbeddedFontFamily? fontFamily, string? pdfFamilyName = null) #Attempts to load an installed TrueType font family from common operating-system font folders.
Parameters
- familyName 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 string? = null
- Optional family name to expose in generated PDF font resource names.
Returns
bool true when an embeddable regular TrueType face was found; otherwise false.