Developer Resources

Font

Overview

The Font class encapsulates a font.

Constructor

Font(family : String, pointsize : Integer, style : Integer, facename : String)

Arguments

family
The family of the new font. One of Font.Default, Font.Roman, Font.Swiss or Font.Modern.
pointsize
The pointsize of the new font.
style
The style of the new font. Combination of Font.Normal, Font.Bold, Font.Italic, and Font.Underlined.
facename
The facename of the new font.

Properties

Font.Default
A flag representing the default font family.
Font.Roman
A flag representing the Roman font family.
Font.Swiss
A flag representing the Swiss font family.
Font.Modern
A flag representing the Modern font family.
Font.Normal
A flag representing the normal font style.
Font.Bold
A flag representing the bold font style.
Font.Italic
A flag representing the italicized font style.
Font.Underlined
A flag representing the underlined font style.

Methods

Font.getFaceName
Gets the facename of the font.
Font.getFamily
Gets the family of the font.
Font.getPointSize
Gets the point size of the font.
Font.getStyle
Gets the style of the font.
Font.setFaceName
Sets the new facename of the font.
Font.setFamily
Sets the new family of the font.
Font.setPointSize
Sets the new point size of the font.
Font.setStyle
Sets the new style of the font.

Font.getFaceName

function Font.getFaceName()

Description

Gets the facename of the font.

Font.getFamily

function Font.getFamily()

Description

Gets the family of the font.

Font.getPointSize

function Font.getPointSize()

Description

Gets the point size of the font.

Font.getStyle

function Font.getStyle()

Description

Gets the style of the font.

Font.setFaceName

function Font.setFaceName(facename : String)

Arguments

facename
The new facename of the font.

Description

Sets the new facename of the font.

Font.setFamily

function Font.setFamily(family : String)

Arguments

family
The new family of the font, where family is one of Font.Default, Font.Roman, Font.Swiss, or Font.Modern.

Description

Sets the new family of the font, where family is one of Font.Default, Font.Roman, Font.Swiss, or Font.Modern.

Font.setPointSize

function Font.setPointSize(size : Integer)

Arguments

size
The new size of the font in points.

Description

Sets the new size of the font in points.

Font.setStyle

function Font.setStyle(style : Integer)

Arguments

style
The new style of the font, which is a combination Font.Normal, Font.Bold, Font.Italic, and Font.Underlined.

Description

Sets the new style of the font to a combination of Font.Normal, Font.Bold, Font.Italic, and Font.Underlined.