SetHTMLNormalFont
Text, HTML text
Description
Specifies the default font for text drawn using DrawHTMLText or DrawHTMLTextBox
Syntax
Delphi
Function TPDFlib.SetHTMLNormalFont(Const FontSet: WideString; FontID: Integer): Integer;
ActiveX
Function PDFlib::SetHTMLNormalFont(FontSet As String, FontID As Long) As Long
DLL
int DLSetHTMLNormalFont(int InstanceID, const wchar_t* FontSet, int FontID);
int DLSetHTMLNormalFontA(int InstanceID, const char* FontSet, int FontID);
Parameters
| FontSet | "Default" (or an empty string) sets the face HTML text starts with. Any other name registers the font under that font family, which a CSS font-family declaration can then select; registering a family leaves the default faces unchanged |
|---|---|
| FontID | The ID of the font to use |
Return values
| 0 | The specified FontID is not a valid font |
|---|---|
| 1 | The font was set successfully |
CSS print profile
HTML layouts support bounded attribute selectors and right-margin-aware wrapping; inspect GetLastHTMLImportDiagnostics for ignored CSS, font-source and processing-limit findings, including cached measurements
Use DrawHTMLPages to apply page size and margins; ordinary text frames diagnose @page rules without resizing the document
A font set explicitly registered by the caller can be referenced by @font-face src: url("registered-key") or local("registered-key"); registration is the only source of font bytes and these declarations do not fetch files or network resources