Skip to main content

FontOptions

Font rendering option

Index

Properties

optionalbaseAlign

baseAlign?: BaseAlign

Optionally specify the text base align, by default Alphabetic

optionalbold

bold?: boolean

Optionally set whether the font is bold, by default false

optionaldirection

direction?: Direction

Optionally specify the text direction, by default LeftToRight

optionalfamily

family?: string

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

optionallineHeight

lineHeight?: number

Optionally override the text line height in pixels, useful for multiline text. If unset will use default.

optionalquality

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

optionalshadow

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

Optionally specify a text shadow, by default none is specified


Type declaration

  • optionalblur?: number
  • optionalcolor?: Color
  • optionaloffset?: Vector

optionalsize

size?: number

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

optionalstyle

style?: FontStyle

Optionally specify the font style, by default Normal

optionaltextAlign

textAlign?: TextAlign

Optionally specify the text align, by default Left

optionalunit

unit?: FontUnit

Optionally specify unit to measure fonts in, by default Pixels