Font rendering option

Hierarchy

  • FontOptions

Properties

baseAlign?: BaseAlign

Optionally specify the text base align, by default Alphabetic

bold?: boolean

Optionally set whether the font is bold, by default false

direction?: Direction

Optionally specify the text direction, by default LeftToRight

family?: string

Optionally specify the font family, by default 'sans-serif'

quality?: number

Optionally specify the quality of the text bitmap, it is a multiplier on the size size, by default 2. Higher quality text has a higher memory impact

shadow?: {
    blur?: number;
    color?: Color;
    offset?: Vector;
}

Optionally specify a text shadow, by default none is specified

Type declaration

  • Optional blur?: number
  • Optional color?: Color
  • Optional offset?: Vector
size?: number

Optionally the size of the font in the specified FontUnit by default 10.

style?: FontStyle

Optionally specify the font style, by default Normal

textAlign?: TextAlign

Optionally specify the text align, by default Left

unit?: FontUnit

Optionally specify unit to measure fonts in, by default Pixels