-
- All Implemented Interfaces:
-
app.rive.AssetOps
public class FontAsset.Companion implements AssetOps<FontHandle, FontAsset>
-
-
Method Summary
Modifier and Type Method Description final Result<FontAsset>fromBytes(CommandQueue commandQueue, ByteArray bytes)Create and decode a font asset from the given byte array on the provided command queue. FontHandledecode(CommandQueue queue, ByteArray bytes)Decode the asset from the given byte array on the provided command queue. Unitdelete(CommandQueue queue, FontHandle handle)Delete the asset from the provided command queue. Unitregister(CommandQueue queue, String key, FontHandle handle)Register the asset with the provided command queue under the given key. Unitunregister(CommandQueue queue, String key)Unregister the asset from the provided command queue for the given key. FontAssetconstruct(FontHandle handle, CommandQueue queue)Construct the asset instance from the given handle, key, and command queue. StringgetTag()The tag used for logging purposes. StringgetLabel()A label for the asset type, used in logging. -
-
Method Detail
-
fromBytes
final Result<FontAsset> fromBytes(CommandQueue commandQueue, ByteArray bytes)
Create and decode a font asset from the given byte array on the provided command queue.
The font can only be used on the same CommandQueue it was created on.
Must be registered with FontAsset.register to be used for referenced fonts.
- Parameters:
commandQueue- The command queue that owns the font.bytes- The byte array containing the font data to decode.
-
decode
FontHandle decode(CommandQueue queue, ByteArray bytes)
Decode the asset from the given byte array on the provided command queue.
-
delete
Unit delete(CommandQueue queue, FontHandle handle)
Delete the asset from the provided command queue.
-
register
Unit register(CommandQueue queue, String key, FontHandle handle)
Register the asset with the provided command queue under the given key.
-
unregister
Unit unregister(CommandQueue queue, String key)
Unregister the asset from the provided command queue for the given key.
-
construct
FontAsset construct(FontHandle handle, CommandQueue queue)
Construct the asset instance from the given handle, key, and command queue.
-
-
-
-