DynaPDF Manual - Page 738

Previous Page 737   Index   Next Page 739

Function Reference
Page 738 of 839
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: fdwCharSet, fdwPitchAndFamily, lpszFace

Next topic: SetFontOrigin, SetFontSearchOrder