FontAsset

class FontAsset(handle: FontHandle, worker: RiveWorker) : Asset<FontHandle>

A font asset, representing a renderable typeface, managed by a RiveWorker.

Parameters

handle

The handle to the font on the command server.

worker

The Rive worker that owns the font.

Constructors

Link copied to clipboard
constructor(handle: FontHandle, worker: RiveWorker)

Types

Link copied to clipboard
object Companion : AssetOps<FontHandle, FontAsset>

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun register(key: String)

Register the asset with the given key. When Rive fulfills a referenced asset, it will look for an asset registered under that key. The key comes from the zip file created when exporting a Rive file.

Link copied to clipboard
fun unregister(key: String)

Unregister the asset with the given key.