Skip to main content

FontSourceOptions

Hierarchy

Index

Properties

optionalinheritedbaseAlign

baseAlign?: BaseAlign

Optionally specify the text base align, by default Alphabetic

optionalinheritedbold

bold?: boolean

Optionally set whether the font is bold, by default false

optionalbustCache

bustCache?: boolean

Whether or not to cache-bust requests

optionalinheritedcolor

color?: Color

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

optionalinheriteddirection

direction?: Direction

Optionally specify the text direction, by default LeftToRight

optionalinheritedfiltering

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

optionalinheritedflipHorizontal

flipHorizontal?: boolean

Should the graphic be flipped horizontally

optionalinheritedflipVertical

flipVertical?: boolean

Should the graphic be flipped vertically

optionalinheritedheight

height?: number

The height of the graphic

optionalinheritedlineCap

lineCap?: butt | round | square

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

optionalinheritedlineDash

lineDash?: number[]

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

optionalinheritedlineHeight

lineHeight?: number

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

optionalinheritedlineWidth

lineWidth?: number

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

optionalinheritedopacity

opacity?: number

The opacity of the graphic between (0 -1)

optionalinheritedorigin

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

optionalinheritedpadding

padding?: number

Optionally specify the padding to apply to the bitmap

optionalinheritedquality

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

optionalinheritedrotation

rotation?: number

The rotation of the graphic

optionalinheritedscale

scale?: Vector

The scale of the graphic

optionalinheritedshadow

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

optionalinheritedsize

size?: number

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

optionalinheritedsmoothing

smoothing?: boolean

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

optionalinheritedstrokeColor

strokeColor?: Color

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

optionalinheritedstyle

style?: FontStyle

Optionally specify the font style, by default Normal

optionalinheritedtextAlign

textAlign?: TextAlign

Optionally specify the text align, by default Left

optionalinheritedtint

tint?: Color

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

optionalinheritedunit

unit?: FontUnit

Optionally specify unit to measure fonts in, by default Pixels

optionalinheritedwidth

width?: number

The width of the graphic