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

DynaPDF Manual - Page 103

Previous Page 102   Index   Next Page 104

Table Functions
Page 103 of 750
SetFont
Syntax:
LBOOL tblSetFont(
const ITBL* Table, // Table pointer
SI32 Row,
// Row index or -1
SI32 Col,
// Column index or -1
const char* Name,
// Font name
TFStyle Style,
// Font style
LBOOL Embed,
// If true, the font will be embedded
TCodepage CP)
// The code page that should be used
The function sets the font that is used to output text. The font is inherited from the table, column,
and row, in this order. The font will be loaded when the table is drawn. The default font size is 10
units. It can be changed with SetFontSize(). The default font selection mode is smFamilyName. It can
be changed with SetFontSelMode().
Remarks:
This function is implemented in an Ansi and Unicode compatible version. Ansi strings are
interpreted as UTF-8 if the flag gfAnsiStringIsUTF8 is set the in the associated PDF instance. See
SetGStateFlags() for further information.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
SetFontSelMode
Syntax:
LBOOL tblSetFontSelMode(
const ITBL* Table, // Table pointer
SI32 Row,
// Row index or -1
SI32 Col,
// Column index or -1
TFontSelMode Mode) // see below
typedef enum
{
smFamilyName
= 0,
smPostScriptName = 1,
smFullName
= 2
}TFontSelMode;
The function sets or changes the font selection mode. The font names used in the corresponding
SetFont() calls must coincide with the font selection mode. The font selection mode is inherited from
the table, column, and row, in this order.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: SetFlags

Next topic: SetPDFInstance