Companion

object Companion : AssetOps<FontHandle, FontAsset>

Properties

Link copied to clipboard
open override val label: String

A label for the asset type, used in logging.

Link copied to clipboard
open override val tag: String

The tag used for logging purposes.

Functions

Link copied to clipboard
open override fun construct(handle: FontHandle, worker: RiveWorker): FontAsset

Construct the asset instance from the given handle, key, and Rive worker.

Link copied to clipboard
open suspend override fun decode(worker: RiveWorker, bytes: ByteArray): FontHandle

Decode the asset from the given byte array on the provided Rive worker.

Link copied to clipboard
open override fun delete(worker: RiveWorker, handle: FontHandle)

Delete the asset from the provided Rive worker.

Link copied to clipboard
suspend fun fromBytes(riveWorker: RiveWorker, bytes: ByteArray): Result<FontAsset>

Create and decode a font asset from the given byte array on the provided Rive worker.

Link copied to clipboard
open override fun register(worker: RiveWorker, key: String, handle: FontHandle)

Register the asset with the provided Rive worker under the given key.

Link copied to clipboard
open override fun unregister(worker: RiveWorker, key: String)

Unregister the asset from the provided Rive worker for the given key.