Font

The font class. Font is a property of the Bitmap class.

If there is a "Fonts" folder directly under the game folder, the font files in it can be used even if they are not installed on the system.

Superclass

Class Methods

Font.new([name[, size]])

Creates a Font object.

Font.exist?(name)

Returns true if the specified font exists on the system.

Properties

name

The font name. Include an array of strings to specify multiple fonts to be used in a desired order.

font.name = ["Myriad", "Verdana"]

In this example, if the higher priority font Myriad does not exist on the system, the second choice Verdana will be used instead.

The default is ["Verdana", "Arial", "Courier New"].

size

The font size. The default is 24 (RGSS3).

bold

The bold flag. The default is FALSE.

italic

The italic flag. The default is FALSE.

outline (RGSS3)

The flag for outline text. The default is TRUE.

shadow

The flag for shadow text. The default is false (RGSS3). When enabled, a black shadow will be drawn to the bottom right of the character.

color

The font color (Color). Alpha values may also be used. The default is (255,255,255,255).

Alpha values are also used when drawing outline (RGSS3) and shadow text.

out_color (RGSS3)

The outline color (Color). The default is (0,0,0,128).

Class Properties

default_name
default_size
default_bold
default_italic
default_shadow
default_outline (RGSS3)
default_color
default_out_color (RGSS3)

You can change the default values set for each component when a new Font object is created.

Font.default_name = ["Myriad", "Verdana"]
Font.default_size = 22
Font.default_bold = true