| Category | Font selection |
|---|
Purpose — Switch to a font handle and apply a new size and style in one call.
Description — Switches first; if that succeeds, applies FontSize (via pdfChangeFontSize's logic) then Style (via pdfChangeFontStyle's logic — same bit-convention caveat applies to Style here as documented in the chapter-level warning, since Style: TFStyle on this entry point too).
Declarations
BOOL32 __stdcall pdfChangeFontEx(PPDF IPDF, int32_t Handle, double FontSize, TFStyle Style);
function pdfChangeFontEx(const IPDF: PPDF; Handle: Integer; FontSize: Double; Style: TFStyle): LongBool; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
Handle | Integer | Target font handle. |
FontSize | Double | New size; <= 0 is silently ignored (previous size kept). |
Style | TFStyle | Same bit-0=Bold/bit-1=Italic convention as pdfChangeFontStyle — see the chapter warning. |
Return value — TRUE if Handle was valid; FALSE otherwise. (Once the handle switch succeeds, the size/style applications cannot themselves cause this call to report failure.)
See also — pdfChangeFont
C# (P/Invoke)
[return: MarshalAs(UnmanagedType.Bool)]
Core
pdfChangeFontEx
The …A form takes UTF-8, …W
takes UTF-16; a bare name aliases the ANSI form.
Worked examples — complete programs in ten languages.