Truetype

data class Truetype(var key: Key = Key("minecraft", "default"), var shift: List<Double> = listOf(), var size: Double = 0.0, var oversample: Double = 0.0) : FontProvider

A truetype font provider. Allows you to use a precompiled truetype font.

For shifting a font upwards, use e.g. [0.0, 10.0]. For shifting downwards, use e.g. [0.0, -10.0].

For shifting a font to the left, use e.g. [10.0, 0.0]. For shifting to the right, use e.g. [-10.0, 0.0].

Parameters

key

The name of the font. E.g. example:custom_font.ttf. Needs to end with .ttf.

shift

Allows you to control the movement of the font horizontally and vertically (in that order).

size

The scale of the font.

oversample

Resolution to render the font at.

See also

Constructors

Link copied to clipboard
constructor(key: Key = Key("minecraft", "default"), shift: List<Double> = listOf(), size: Double = 0.0, oversample: Double = 0.0)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var key: Key
Link copied to clipboard
Link copied to clipboard
open override val providerCodec: MapCodec<out FontProvider>
Link copied to clipboard
Link copied to clipboard