API referenceFonts

pdfEnumHostFonts

Enumerate installed system fonts via a callback (family +

CategoryHost font enumeration

Purpose — Enumerate installed system fonts via a callback (family + style summary, non-extended).

Declarations

C
int32_t __stdcall pdfEnumHostFonts(PPDF IPDF, void* Data, TEnumFontProc EnumProc);
Delphi
function pdfEnumHostFonts(const IPDF: PPDF; const Data: Pointer; EnumProc: TEnumFontProc): Integer; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IPDFPPDFNot consulted — enumeration is not per-document.
DataPointerOpaque context passed through to the callback.
EnumProcTEnumFontProcCallback invoked once per installed font. NULL returns 0 immediately (unlike pdfEnumDocFonts, which returns a count when its callback is NULL — this one does not).

Return value — Number of fonts enumerated; 0 if EnumProc is NULL.

See alsopdfEnumHostFontsEx, pdfGetSysFontInfo

C# (P/Invoke)

wrappers/dotnet/LumasPdf.cs
public static extern int pdfEnumHostFonts(IntPtr IPDF, IntPtr Data, TEnumFontProc EnumProc);
Area
Fonts
Category

Core

Exported names

pdfEnumHostFonts

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.