FontContent

Contains all fonts of the resource pack.

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
inner class LoadAll(builder: ResourcePackBuilder) : PackTask

Loads all fonts (vanillaFonts and customFonts).

Link copied to clipboard
inner class Write(builder: ResourcePackBuilder) : PackTask

Writes all custom fonts in FontContent to the resource pack.

Properties

Link copied to clipboard

The fonts defined in the resource pack

Link copied to clipboard
Link copied to clipboard

The fonts of the vanilla assets

Functions

Link copied to clipboard
fun add(font: Font)

Adds font to the fonts of this resource pack.

Link copied to clipboard
operator fun get(id: ResourcePath<ResourceType.Font>): Font?

Gets the font under id or null if no such font exists.

Link copied to clipboard

Gets the font under id or creates and registers a new Font with the given id if no such font exists.

Link copied to clipboard

Removes the font with the given id from the fonts of this resource pack.

operator fun minusAssign(font: Font)

Removes font from the fonts of this resource pack.

Link copied to clipboard
operator fun plusAssign(font: Font)

Adds font to the fonts of this resource pack.

Link copied to clipboard

Removes the font with the given id from the fonts of this resource pack.

fun remove(font: Font)

Removes font from the fonts of this resource pack.