DefaultFontLoader

Default implementation of a FontLoader.

Parameters

context

the Context from which to load the font resources

handler

a Handler for the thread the completion of loading the font should called on. If null, the UI thread will be used.

Default implementation of a FontLoader.

actual class DefaultFontLoader

Default implementation of a FontLoader.

Default implementation of a FontLoader.

Parameters

transformer

method for getting a KalugaFont from a String identifier

Default implementation of a FontLoader.

Parameters

transformer

method for getting a KalugaFont from a String identifier

Constructors

Link copied to clipboard
constructor(context: Context?, handler: Handler?)
actual constructor()
expect constructor()
actual constructor()
constructor(transformer: suspend (String) -> KalugaFont?)
actual constructor()
constructor(transformer: suspend (String) -> KalugaFont?)
actual constructor()

Functions

Link copied to clipboard
open suspend override fun loadFont(identifier: String, defaultValue: KalugaFont?): KalugaFont?

Attempts to load the KalugaFont resource associated with a given identifier. If no match is found, the defaultValue will be returned.

abstract suspend fun loadFont(identifier: String, defaultValue: KalugaFont?): KalugaFont?

Attempts to load the KalugaFont resource associated with a given identifier. If no match is found, the defaultValue will be returned.

open suspend fun loadFont(identifier: String, defaultValue: <Error class: unknown class>?): <Error class: unknown class>?
open suspend override fun loadFont(identifier: String, defaultValue: KalugaFont?): KalugaFont?

Attempts to load the KalugaFont resource associated with a given identifier. If no match is found, the defaultValue will be returned.

open suspend override fun loadFont(identifier: String, defaultValue: KalugaFont?): KalugaFont?

Attempts to load the KalugaFont resource associated with a given identifier. If no match is found, the defaultValue will be returned.