API referenceFonts

pdfGetSysFontInfo

Read info for the Handle-th installed system font.

CategoryHost font enumeration
Notea process-global, build-once cache (see Remarks)

Purpose — Read info for the Handle-th installed system font.

Declarations

C
int32_t __stdcall pdfGetSysFontInfo(PPDF IPDF, uint32_t Handle, TPDFSysFont* Value);
Delphi
function pdfGetSysFontInfo(const IPDF: PPDF; Handle: Cardinal; var Value: TPDFSysFont): Integer; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFNot consulted for the enumeration itself — see Remarks.
HandleCardinal1-based index into the system-font list.
ValueTPDFSysFont*Receives FamilyName, PostScriptName, Style.

Return value1 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 alsopdfEnumHostFonts

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfGetSysFontInfo(IntPtr IPDF, uint Handle, ref TPDFSysFont Value);
Area
Fonts
Category

Getters

Exported names

pdfGetSysFontInfo

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.