MetadataRepo


@AnyThread
class MetadataRepo


Class to hold the emoji metadata required to process and draw emojis.

Summary

Public functions

java-static MetadataRepo
create(assetManager: AssetManager, assetPath: String)

Construct MetadataRepo from an asset.

java-static MetadataRepo
create(typeface: Typeface, byteBuffer: ByteBuffer)

Construct MetadataRepo from a byte buffer.

java-static MetadataRepo
create(typeface: Typeface, inputStream: InputStream)

Construct MetadataRepo from an input stream.

Public functions

create

Added in 1.0.0
java-static fun create(assetManager: AssetManager, assetPath: String): MetadataRepo

Construct MetadataRepo from an asset.

Parameters
assetManager: AssetManager

AssetManager instance

assetPath: String

asset manager path of the file that the Typeface and metadata will be created from

create

Added in 1.0.0
java-static fun create(typeface: Typeface, byteBuffer: ByteBuffer): MetadataRepo

Construct MetadataRepo from a byte buffer. The position of the ByteBuffer will change, it is caller's responsibility to reposition the buffer if required.

Parameters
typeface: Typeface

Typeface to be used to render emojis

byteBuffer: ByteBuffer

ByteBuffer to read emoji metadata from

create

Added in 1.0.0
java-static fun create(typeface: Typeface, inputStream: InputStream): MetadataRepo

Construct MetadataRepo from an input stream. The library does not close the given InputStream, therefore it is caller's responsibility to properly close the stream.

Parameters
typeface: Typeface

Typeface to be used to render emojis

inputStream: InputStream

InputStream to read emoji metadata from