Breadcrumbs

SetFont

Specifies the font to be used for the subsequent output of text. This method must be called at least once before text is output, otherwise the resulting document is invalid.

Syntax

  Func_FbMnFPDF_SetFont.bmp

C++
METHOD PUBLIC SetFont : BOOL
VAR_INPUT
    family : STRING := '';
    style : STRING := '';
    size : INT;
END_VAR

Parameters

Parameter

Description

family 

Name of one of the standard fonts (case insensitive):

  • Courier (fixed width)

  • Helvetica or Arial (Synonym; Sans Serif)

  • Times (Serif)

  • Symbol (Symbols)

  • ZapfDingbats (Symbols)


When an empty string is passed, the currently set font is used. 

style 

Defines the text formatting. Possible values for this are (case insensitive):

  • Empty string: Normal

  • B: Fat

  • I: Italic

  • U: Underline


A combination of these values can also be used. Regular is used by default. B (bold) and I (italic) cannot be used for Symbol fonts Symbol and ZapfDingbats. 

size 

Specifies the size of the font. The font size is specified in the measurement unit point, independent of the measurement unit defined for the document. By default, the last specified font size set with SetFontSize() or a previous SetFont() call is used. If no font size has been specified yet, the font size is 12 points. 

Return value 

Status of the call. 


Example



Requirements



Remarks