| Category | Font introspection |
|---|
Purpose — Read the fuller metrics set: ascent, descent, cap-height, x-height, underline position/thickness, leading, max advance width, italic angle, and missing-width default.
Declarations
C
BOOL32 __stdcall pdfGetFontMetrics(PPDF IPDF, uint32_t Handle, TPDFFontMetrics* Metrics);
Delphi
function pdfGetFontMetrics(const IPDF: PPDF; Handle: Cardinal; var Metrics: TPDFFontMetrics): LongBool; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Handle | Cardinal | Font handle (works across font kinds, unlike pdfGetFontEx). |
Metrics | TPDFFontMetrics* | Receives the full metrics set. |
Return value — TRUE if Handle is valid; FALSE otherwise.
See also — pdfGetFontEx
C# (P/Invoke)
wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Fonts
Category
Getters
Exported names
pdfGetFontMetrics
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.