API referenceFonts

fntGetFontInfo

Read extended info from a PFNT snapshot.

CategoryFont-object introspection
Noteseveral output fields are hardcoded, not derived (see Remarks)

Purpose — Read extended info from a PFNT snapshot.

Declarations

C
BOOL32 __stdcall fntGetFontInfo(PFNT IFont, TPDFFontInfo* F);
Delphi
function fntGetFontInfo(const IFont: PFNT; var F: TPDFFontInfo): LongBool; stdcall; external 'LumasPdf.dll';

Parameters

ParameterTypeDescription
IFontPFNTSnapshot handle.
FTPDFFontInfo*Receives FamilyName, FullName, Style, BaseType (fbtTrueType or fbtStdFont), IsEmbedded — all real — plus the fields below, which are not.

Return valueTRUE if IFont is non-NULL; FALSE otherwise.

Remarks — hardcoded fields, verified. F.FilePath is always NULL, F.FontIndex is always 0, F.Flags is always 0, F.IsSubset is always FALSE, and F.IsVertical is always FALSE — the PFntPub snapshot this call reads from doesn't carry that data (contrast with pdfGetFontInfoEx, which derives real values for the equivalent fields from the full font entry and, for TrueType, the actual font program's tables). Use pdfGetFontInfoEx instead of this call when you need those fields populated.

C# (P/Invoke)

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

Font Services

Exported names

fntGetFontInfo

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.