API referenceFonts

pdfGetFontInfoEx

Read extended font info: source file path (if host-loaded),

CategoryFont introspection

Purpose — Read extended font info: source file path (if host-loaded), vertical-writing flag, and derived style bits (bold/italic/serif/monospace/ symbolic).

Description — Style detection is two-tiered: a name heuristic first (substring match on "bold", "italic"/"oblique", "times"/"serif"/ etc., "courier"/"mono", "symbol"/"dingbat"/"wingding"), then — for a host-loaded TrueType font — overridden by the real font program's tables (post, head.macStyle, OS/2.fsSelection, OS/2.panose, hmtx advance-width uniformity) when available, which take authority over the name guess. IsVertical reflects the font entry's own flag, or is inferred TRUE for a CID-predefined font whose CMap declares WMode=1.

Declarations

C
BOOL32 __stdcall pdfGetFontInfoEx(PPDF IPDF, uint32_t Handle, TPDFFontInfo* F);
Delphi
function pdfGetFontInfoEx(const IPDF: PPDF; Handle: Cardinal; var F: TPDFFontInfo): LongBool; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFInstance handle.
HandleCardinalFont handle.
FTPDFFontInfo*Receives FontIndex, FilePath (host source path, or NULL for std-14/non-file-backed fonts), IsVertical, and style-bit fields.

Return valueTRUE if Handle resolves to a registered font; FALSE otherwise.

Remarks — Resolves only against FFonts (fonts your code created via pdfSetFont/pdfLoadFont/etc.) — an imported page's fonts are not reachable by handle through this call; those are read via the separate GetImportPageFont*(page, index) family (V17), which carries no real /FontDescriptor flags to expose here either.

See alsopdfGetFontEx

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Fonts
Category

Getters

Exported names

pdfGetFontInfoEx

String variants

The …A form takes UTF-8, …W takes UTF-16; a bare name aliases the ANSI form.

See working code

Worked examples — complete programs in ten languages.