loadFreeTypeFontAsync

inline fun AssetStorage.loadFreeTypeFontAsync(path: String, setup: FreeTypeFontGenerator.FreeTypeFontParameter.() -> Unit = {}): Deferred<BitmapFont>

Loads a FreeType font asynchronously. Allows customizing parameters of a loaded FreeType font.

path is the file path to the FreeType font file. Must be compatible with the AssetStorage.fileResolver.

setup can be used to specify and customize the parameters of the loaded font. It will be inlined and invoked on a FreeTypeFontParameter.

Returns a Deferred reference to the loaded font. See AssetStorage.loadAsync for lists of possible outcomes.

See also loadFreeTypeFont and loadFreeTypeFontSync.


inline fun AsyncAssetManager.loadFreeTypeFontAsync(file: String, setup: FreeTypeFontGenerator.FreeTypeFontParameter.() -> Unit = {}): Deferred<BitmapFont>

Allows customizing parameters of a FreeType font loaded asynchronously.

Return

Asset wrapper which allows to access the font once it is loaded.

Parameters

file

path to the FreeType font file.

setup

should specify font parameters. Will be invoked on a new instance of FreeTypeFontParameter. Inlined.