Skip to main content

FontSourceOptions

Hierarchy

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

optionalbustCache

bustCache?: boolean

Whether or not to cache-bust requests

optionalcolor

color?: Color

Optionally specify the color of the raster's bitmap context, by default [[Color.Black]]

optionaldirection

direction?: Direction

Optionally specify the text direction, by default LeftToRight

optionalfiltering

filtering?: ImageFiltering

Optionally specify what image filtering mode should be used, [[ImageFiltering.Pixel]] for pixel art, [[ImageFiltering.Blended]] for hi-res art

By default unset, rasters defer to the engine antialiasing setting

optionalflipHorizontal

flipHorizontal?: boolean

Should the graphic be flipped horizontally

optionalflipVertical

flipVertical?: boolean

Should the graphic be flipped vertically

optionalheight

height?: number

The height of the graphic

optionallineCap

lineCap?: butt | round | square

Optionally specify the line end style, default is "butt".

optionallineDash

lineDash?: number[]

Optionally specify the line dash of the raster's bitmap, by default [] which means none

optionallineHeight

lineHeight?: number

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

optionallineWidth

lineWidth?: number

Optionally specify the line width of the raster's bitmap, by default 1 pixel

optionalopacity

opacity?: number

The opacity of the graphic between (0 -1)

optionalorigin

origin?: Vector

The origin of the drawing in pixels to use when applying transforms, by default it will be the center of the image in pixels

optionalpadding

padding?: number

Optionally specify the padding to apply to the bitmap

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

optionalrotation

rotation?: number

The rotation of the graphic

optionalscale

scale?: Vector

The scale of the graphic

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.

optionalsmoothing

smoothing?: boolean

Optionally specify "smoothing" if you want antialiasing to apply to the raster's bitmap context, by default false

optionalstrokeColor

strokeColor?: Color

Optionally specify the stroke color of the raster's bitmap context, by default undefined

optionalstyle

style?: FontStyle

Optionally specify the font style, by default Normal

optionaltextAlign

textAlign?: TextAlign

Optionally specify the text align, by default Left

optionaltint

tint?: Color

The tint of the graphic, this color will be multiplied by the original pixel colors

optionalunit

unit?: FontUnit

Optionally specify unit to measure fonts in, by default Pixels

optionalwidth

width?: number

The width of the graphic