PdfFontManagerGetRegisteredBaseFont Method

Loads a registered base font by name or alias

Definition

Namespace: HiQPdf.Next
Assembly: HiQPdf.Next (in HiQPdf.Next.dll) Version: 18.9.2
C#
public static PdfBaseFont GetRegisteredBaseFont(
	string fontNameOrAlias,
	bool subset = true,
	IList<int[]> unicodeRanges = null
)

Parameters

fontNameOrAlias  String
The name or alias under which the font was registered. Accepted values are: a full font name (e.g. "Arial Bold", "Calibri Light"), a PostScript name (e.g. "ArialMT", "Arial-BoldMT"), or a custom alias registered via RegisterFont(String, String). Use GetRegisteredFonts to list all available names. To select a font variant by style (bold, italic) rather than by exact name, use CreateRegisteredFont(String, Single, PdfFontStyle, PdfColor) with a family name instead
subset  Boolean  (Optional)
to write only the glyphs used in the document; to embed the full font (required for editable form fields)
unicodeRanges  IListInt32  (Optional)
Optional Unicode ranges to include in the ToUnicode CMap of the embedded font, specified as pairs of [start, end] codepoint values (e.g. new[] { new[] { 0x0020, 0x007F } } for Basic Latin). Only applicable when subset is . If null, all Unicode ranges supported by the font are included

Return Value

PdfBaseFont
A base font that can be used to create styled fonts

See Also