asFont

suspend fun String.asFont(fontLoader: FontLoader = DefaultFontLoader(), defaultValue: KalugaFont? = null): KalugaFont?

Treats this string as a resource identifier for a KalugaFont and grabs the associated KalugaFont

Return

The KalugaFont associated with the identifier represented by this String, or defaultValue if no such KalugaFont could be found.

Parameters

fontLoader

The FontLoader used for loading the associated KalugaFont resource.

defaultValue

The KalugaFont to return if no match was found for the identifier. Defaults to null.