| Category | Font-object introspection |
|---|
Purpose — Read basic metrics (ascent/descent/cap-height, em-normalized to 1000 units) and base font name from a PFNT snapshot.
Declarations
C
BOOL32 __stdcall fntGetFont(PFNT IFont, TPDFFontObj* F);
Delphi
function fntGetFont(const IFont: PFNT; var F: TPDFFontObj): LongBool; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IFont | PFNT | Snapshot handle. |
F | TPDFFontObj* | Receives the metrics. |
Return value — TRUE on success; FALSE if IFont is NULL or the snapshot's UnitsPerEm is <= 0 (degenerate/unavailable metrics).
See also — pdfGetFontEx (the equivalent call taking a real document font handle instead of a PFNT snapshot)
C# (P/Invoke)
wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Fonts
Category
Font Services
Exported names
fntGetFont
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.