Constructor

new(entry:FileEntry)

Methods

toFont():Font

Load and cache the font instance.

Because font instance is cached, operations like resizeTo should be performed on a copy of the font, to avoid affecting other text fields.

@:value({ smoothing : -1, alphaCutoff : 0.5, channel : 0 })toSdfFont(?size:Int, channel:SDFChannel = 0, alphaCutoff:Float = 0.5, smoothing:Float = -1):Font

Load and cache Signed Distance Field font with specified size, channel, alphaCutoff and smoothing. ( default : initial size, red, 0.5, -1 ) For more information on SDF texture generation refer to this page: https://github.com/libgdx/libgdx/wiki/Distance-field-fonts For more information on MSDF texture generation refer to this page: https://github.com/Chlumsky/msdfgen

Because font instance is cached, operations like resizeTo should be performed on a copy of the font, to avoid affecting other text fields.

Parameters:

channel

The channel that serves as distance data source.

alphaCutoff

The distance value that is considered to be the edge. Usually should be 0.5.

smoothing

The smoothing of edge. Lower value lead to sharper edges. Value of -1 sets it to automatic.

Inherited Variables

Defined by Resource

read onlyentry:FileEntry

read onlyname:String

Inherited Methods

Defined by Resource

watch(onChanged:Null<() ‑> Void>):Void