| Category | Host font enumeration |
|---|---|
| Note | a process-global, build-once cache (see Remarks) |
Purpose — Read info for the Handle-th installed system font.
Declarations
int32_t __stdcall pdfGetSysFontInfo(PPDF IPDF, uint32_t Handle, TPDFSysFont* Value);
function pdfGetSysFontInfo(const IPDF: PPDF; Handle: Cardinal; var Value: TPDFSysFont): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Not consulted for the enumeration itself — see Remarks. |
Handle | Cardinal | 1-based index into the system-font list. |
Value | TPDFSysFont* | Receives FamilyName, PostScriptName, Style. |
Return value — 1 on success; 0 if Handle is out of range.
Remarks — process-global cache, not per-instance, not per-document. The first call to this function (by any IPDF instance in the process) builds a global system-font list once (GSysFontBuilt/GSysFontCnt, process-wide static variables) by enumerating installed fonts; subsequent calls, from any instance, reuse that same cache. If fonts are installed/removed on the system after the first call in a process's lifetime, this list will not reflect the change without a process restart.
See also — pdfEnumHostFonts
C# (P/Invoke)
public static extern int pdfGetSysFontInfo(IntPtr IPDF, uint Handle, ref TPDFSysFont Value);
Getters
pdfGetSysFontInfo
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.