| Category | HTML text engine fonts |
|---|---|
| Note | real, consumed by RenderHtml |
Purpose — Set the font used for unstyled (<b>/<i>-free) runs in pdfDrawHTMLText and its measurement siblings.
Declarations
C
int32_t __stdcall pdfSetHTMLNormalFont(PPDF IPDF, const char* Name);
int32_t __stdcall pdfSetHTMLNormalFontA(PPDF IPDF, const char* Name);
int32_t __stdcall pdfSetHTMLNormalFontW(PPDF IPDF, const wchar_t* Name);
Delphi
function pdfSetHTMLNormalFontA(const IPDF: PPDF; Name: PAnsiChar): Integer; stdcall; external 'LumasPdf.dll';
function pdfSetHTMLNormalFontW(const IPDF: PPDF; Name: PWideChar): Integer; stdcall; external 'LumasPdf.dll';
Parameters
| Parameter | Type | Description |
|---|---|---|
IPDF | PPDF | Instance handle. |
| Name | string | Font name, resolved the same way as pdfSetFont at draw time (this call just stores the name; resolution happens per HTML render). |
Return value — 1 on a valid handle.
See also — pdfSetHTMLBoldFont, pdfSetHTMLItalicFont, pdfSetHTMLBoldItalicFont
C# (P/Invoke)
wrappers/dotnet/LumasPdf.cs
public static extern int pdfSetHTMLNormalFontW(IntPtr IPDF, IntPtr Name);
public static extern int pdfSetHTMLNormalFont(IntPtr IPDF, IntPtr Name);
public static extern int pdfSetHTMLNormalFontA(IntPtr IPDF, IntPtr Name);
Area
Fonts
Category
Setters
Exported names
pdfSetHTMLNormalFontW
pdfSetHTMLNormalFont
pdfSetHTMLNormalFontA
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.