PdfFontManagerCreateBaseFont Method
Creates a base font from a font file with optional Unicode range restrictions.
When ranges are specified, only the glyphs in those ranges are included in the
ToUnicode CMap, reducing file size for fonts with large character sets (e.g. CJK).
The result is cached per unique combination of path, subset and unicodeRanges
Namespace: HiQPdf.NextAssembly: HiQPdf.Next (in HiQPdf.Next.dll) Version: 18.9.2
public static PdfBaseFont CreateBaseFont(
string fontPath,
bool subset = true,
IList<int[]> unicodeRanges = null
)
- fontPath String
- The path to the font file
- 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
PdfBaseFontA base font that can be used to create styled fonts