Xbasic

SET_FONT Function

Syntax

V SET_FONT(C fontname[,C fore_color[,C back_color]])

Arguments

fontname

The name of a font, its point size, and its attributes in the format "Font_Name[,Point_Size,Attribute_List]".

Argument
Description
Font_Name

The name of a font, as in Verdana.

Point_Size

Optional. A number, as in 12.

Attribute_List

Optional. Default = no attributes. May be any of the following:

"b" = bold
"i" = italic
"u" = underline
or any combination of the three attributes, as in biu.
fore_color

Optional. Default = "black". The fill color of the text character. A named Alpha Anywhere color or the RGB color code in the format "#R,G,B", where R, G, and B are integers with values between 0 and 255.

back_color

Optional. Default = "white". The background color of the text character. A named Alpha Anywhere color or the RGB color code in the format "#R,G,B", where R, G, and B are integers with values between 0 and 255.

Description

Set font for drawing text.

Discussion

The SET_FONT() function sets the current Font, foreground color ( Fore_Color ), and background color ( Back_Color ) for text.

Example

<<%code%
...
set_font("Verdana,12,b", "Yellow", "blue")
text("North", 2.75, 2.45)
...
%code%)

Limitations

Used only in the Code sections of UI_BITMAP_DRAW(), UI_SCREEN_DRAW(), and UI_PRINTER_DRAW().

See Also