API reference

Fonts

82 functions. Every declaration on the detail pages is extracted from the shipped bindings.

Content Creation

pdfAddFontSearchPath Register a directory to search for .pfb Type 1 fonts when

Core

pdfActivateAltFontList Mark a list as the "active" alternate-font list.
pdfChangeFont Switch the active font to a previously-created font handle,
pdfChangeFontEx Switch to a font handle and apply a new size and style in
pdfChangeFontSize Change the point size of the currently active font.
pdfChangeFontStyle Change the style of the currently active font FAMILY, fully
pdfChangeFontStyleEx Same as [pdfChangeFontStyle](#api-pdfchangefontstyle).
pdfClearHostFonts Nominally: clear/reset the host (system) font cache or
pdfDeleteAltFontList Delete a list created by
pdfEnumDocFonts Enumerate every registered font entry via a callback,
pdfEnumHostFonts Enumerate installed system fonts via a callback (family +
pdfEnumHostFontsEx Extended-info variant of
pdfLoadCMap Register a predefined CMap name for use with
pdfLoadFont Load a font directly from an in-memory buffer (TrueType data).
pdfLoadFontEx Load a font directly from a file path — TrueType (.ttf/
pdfNoEmbedFontListAdd Nominally: blacklist a font name from being embedded.
pdfNoEmbedFontListCount Number of names currently on the no-embed font list.
pdfNoEmbedFontListGet Retrieve the font name at a given index of the no-embed list.
pdfNoEmbedFontListRemoveAll Clear the no-embed font list.
pdfNoEmbedFontListRemoveIndex Remove one entry from the no-embed font list by index.
pdfNoEmbedFontListRemoveName Remove one entry from the no-embed font list by name
pdfPageHasFontResources Quick check for whether a page selects any font (uses the
pdfReplaceFont Replace an already-registered document font (by its PDFFont
pdfReplaceFontEx Nominally: replace a document font with the font file at
pdfSaveFontToFile Write the currently active font's raw font-program bytes to a
pdfTestGlyphs Count (and record) how many characters in Text have no
pdfTestGlyphsEx Explicit-length variant of
pdfUpdateTrueTypeSubsettedFont Mark additional characters as "used" in the current TrueType

Font Services

fntBuildFamilyNameAndStyle Read a PFNT snapshot's family name and style bits.
fntCmapGID Map a Unicode code point to a glyph ID using a TrueType
fntGetFont Read basic metrics (ascent/descent/cap-height, em-normalized
fntGetFontInfo Read extended info from a PFNT snapshot.
fntGetSpaceWidth Width of a single space character at FontSize, for a PFNT
fntGetTextWidth Measure text width using a PFNT snapshot's per-byte width
fntGlyfOutline Extract a glyph's contour outline directly from raw TrueType
fntTranslateRawCode Decode raw show-string bytes (from a PFNT snapshot's font)
fntTranslateString Copy the already-decoded Unicode text carried by a
fntTranslateString2 Decode raw bytes to Unicode using a PFNT snapshot's encoding

Forms

pdfSetFieldFont Set a form field's /DA (Default Appearance) font name and
pdfSetFieldFontEx Nominally: associate a specific, already-loaded document font
pdfSetFieldFontSize Set a field's /DA font size, preserving the existing font

Getters

pdfGetActiveFont Get the handle of the currently active font.
pdfGetCMap Read metadata for the Index-th currently-active CMap
pdfGetCMapCount Number of currently-active CMaps (see
pdfGetFontCount Number of font entries registered on this document (all
pdfGetFontEx Read basic font-descriptor metrics (ascent/descent/cap-height,
pdfGetFontInfoEx Read extended font info: source file path (if host-loaded),
pdfGetFontMetrics Read the fuller metrics set: ascent, descent, cap-height,
pdfGetFontOrigin Read back the value stored by
pdfGetFontSearchOrder Nominally: read the 4-slot font-source search order
pdfGetFontSelMode Read back the mode value stored by
pdfGetFontSize Get the current font size.
pdfGetFontWeight Nominally: read back a user-set font-weight hint.
pdfGetGlyphIndex Map a Unicode code point to its glyph ID in the currently
pdfGetGlyphOutline Extract the point-contour outline of one glyph from the
pdfGetMissingGlyphs Retrieve the code points found missing by the most recent
pdfGetSysFontInfo Read info for the Handle-th installed system font.
pdfGetUseStdFonts Nominally: read whether standard-14 font substitution is
pdfGetUseSystemFonts Read back the system-fonts flag stored by

Misc

psrChangeAltFont Select which registered alt font (from
psrSetAltFont Register an alternate font name in a psr context (see

Object Creation

pdfCreateAltFontList Allocate a new named alternate-font list, returning a handle.

Setters

pdfSetAltFonts Set the ordered list of fallback font names
pdfSetCIDFont Select a CID-keyed font for CJK/composite text, encoded
pdfSetCMapDir Nominally: configure a directory to search for external CMap
pdfSetFont Select (creating on first use) a font by name, style, and size
pdfSetFontEncodingDiff Override the glyph name for one character code in a simple
pdfSetFontEx Same resolution chain as [pdfSetFont](#api-pdfsetfont), with
pdfSetFontFlags Override the /Flags bitmask written into every font's
pdfSetFontOrigin Nominally: set a font-origin preference; the value is stored
pdfSetFontSearchOrder Nominally: set the base-type order the font search should
pdfSetFontSearchOrderEx 4-argument convenience form of
pdfSetFontSelMode Nominally: choose a font-selection strategy mode.
pdfSetFontWeight Nominally: hint a numeric font weight (e.g. 100–900) for the
pdfSetHTMLBoldFont Set the font used for <b>/<strong> runs in HTML text.
pdfSetHTMLBoldItalicFont Set the font used for combined <b><i> runs in HTML text.
pdfSetHTMLItalicFont Set the font used for <i>/<em> runs in HTML text.
pdfSetHTMLNormalFont Set the font used for unstyled (<b>/<i>-free) runs in
pdfSetListFont Nominally: designate a font handle to use for list-box/combo
pdfSetUseStdFonts Nominally: enable/disable falling back to the standard-14
pdfSetUseSystemFonts Nominally: enable/disable falling back to installed system

Validation

pdfCheckAndRepairFonts Validate every registered font entry and repair anything