Package 

Object FontAsset.Companion

    • Method Detail

      • fromBytes

         final Result<FontAsset> fromBytes(CommandQueue riveWorker, ByteArray bytes)

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

        The font can only be used on the same RiveWorker it was created on.

        Must be registered with FontAsset.register to be used for referenced fonts.

        ⚠️ The lifetime of the returned font is managed by the caller. Make sure to call close when you are done with it to release its resources.

        Parameters:
        riveWorker - The Rive worker that owns the font.
        bytes - The byte array containing the font data to decode.
      • getLabel

         String getLabel()

        A label for the asset type, used in logging.