| Category | Font selection |
|---|
Purpose — Switch the active font to a previously-created font handle, without touching size or style.
Declarations
C
BOOL32 __stdcall pdfChangeFont(PPDF IPDF, int32_t Handle);
Delphi
function pdfChangeFont(const IPDF: PPDF; Handle: Integer): LongBool; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle with an open document. |
Handle | Integer | A handle from pdfSetFont/pdfLoadFont/pdfReplaceFont. |
Return value — TRUE if Handle is in range 1..fontCount; FALSE otherwise.
See also — pdfChangeFontEx
C# (P/Invoke)
wrappers/dotnet/LumasPdf.cs
[return: MarshalAs(UnmanagedType.Bool)]
Area
Fonts
Category
Core
Exported names
pdfChangeFont
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.