Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 660

Previous Page 659   Index   Next Page 661

Function Reference
Page 660 of 750
Remarks:
The function SetFont() is implemented in an Ansi and Unicode compatible version. Family and full
names are originally defined in Unicode so that this version is preferred when the font selection
mode is set to smFamilyName (default) or smFullName.
All string functions report a warning if one or more glyphs cannot be found. Call
GetMissingGlyphs() to determine which characters could not be found.
Return values:
If the function succeeds the return value is the font handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
SetFontEx
Syntax:
SI32 pdfSetFontEx(
const PPDF* IPDF, // Instance pointer
const char* Name, // Font name or NULL (see note below)
TFStyle Style,
// Font style
double Size,
// Font size
LBOOL Embed,
// If true, the font is embedded
TCodepage CP)
// Code page
The function loads a font that can be used for text output and interactive form fields. The difference
in comparison to SetFont() is the way how the function tries to find the font.
If the font style is <> fsNone the function searches the font first by family name, then by full name,
and finally by postscript name if the font was not already found.
If the font style is set to fsNone the function searches the font first by full name, then by postscript
name, and finally by family name if the font was not already found.
It is also possible to set the font name to NULL to deactivate the active font. This can be useful when
creating form fields. It means: use the default font of the global AcroForm object for new fields.
The search runs are non-case-sensitive and spaces in the font name will be ignored.
This function can be used if a PDF font should be loaded or if it is not known whether the given font
name represents a family, full, or postscript name. See also SetFont().
Return values:
If the function succeeds the return value is the font handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
 

Previous topic: lpszFace

Next topic: SetFontSearchOrder