| Category | Font 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
BOOL32 __stdcall pdfGetFontInfoEx(PPDF IPDF, uint32_t Handle, TPDFFontInfo* F);
function pdfGetFontInfoEx(const IPDF: PPDF; Handle: Cardinal; var F: TPDFFontInfo): LongBool; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Handle | Cardinal | Font handle. |
F | TPDFFontInfo* | Receives FontIndex, FilePath (host source path, or NULL for std-14/non-file-backed fonts), IsVertical, and style-bit fields. |
Return value — TRUE 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 also — pdfGetFontEx
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Getters
pdfGetFontInfoEx
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.