MinecraftFontGlyph

data class MinecraftFontGlyph(val advance: Float, val left: Float, val top: Float, val right: Float, val bottom: Float, val image: DrawImage?, val channel: MinecraftGlyphChannel = MinecraftGlyphChannel.Color, val boldOffset: Float = 1.0f, val shadowOffset: Float = 1.0f, val orientation: SampledImageOrientation, val oversizedRasterSize: IntSize? = null)(source)

Immutable detached glyph pixels and native logical metrics. Ink bounds are relative to the same top-left logical origin supplied to Minecraft text drawing. The image contains the complete sampled glyph rectangle, ready for ordinary RGBA tint multiplication; intensity backends replicate coverage into every channel before returning it. A null image represents an advance without ink unless MinecraftFontGlyph.oversizedRasterSize records an atlas-rejected source raster. MinecraftFontGlyph.channel records provenance without requiring another shader conversion. MinecraftFontGlyph.orientation preserves reversed native source coordinates through normalized ink bounds without rearranging pixels. Advance and ink metrics may retain native NaN or infinity; callers must omit non-finite final quads before constructing portable geometry. Finite bounds remain normalized, while offsets stay finite and non-negative. Values are safe to retain after their engine and native face close.

Throws

when finite ink bounds are reversed, offsets are invalid, an image is empty, or an oversized-raster marker is inconsistent.

Constructors

Link copied to clipboard
constructor(advance: Float, left: Float, top: Float, right: Float, bottom: Float, image: DrawImage?, channel: MinecraftGlyphChannel = MinecraftGlyphChannel.Color, boldOffset: Float = 1.0f, shadowOffset: Float = 1.0f, orientation: SampledImageOrientation, oversizedRasterSize: IntSize? = null)
constructor(advance: Float, left: Float, top: Float, right: Float, bottom: Float, image: DrawImage?, channel: MinecraftGlyphChannel = MinecraftGlyphChannel.Color, boldOffset: Float = 1.0f, shadowOffset: Float = 1.0f, orientation: SampledImageOrientation)

Creates a glyph with explicit source orientation and no deferred atlas rejection. Inputs, detached ownership, and validation follow the primary constructor.

constructor(advance: Float, left: Float, top: Float, right: Float, bottom: Float, image: DrawImage?, channel: MinecraftGlyphChannel = MinecraftGlyphChannel.Color, boldOffset: Float = 1.0f, shadowOffset: Float = 1.0f)

Creates a glyph whose source coordinates increase along both normalized ink axes. Inputs, detached ownership, and validation follow the primary constructor.

Properties

Link copied to clipboard

ordinary cursor advance, including a provider's configured spacing.

Link copied to clipboard

extra advance and offset used by bold rendering.

Link copied to clipboard

bottom ink-quad offset.

Link copied to clipboard

source-channel interpretation.

Link copied to clipboard

immutable source pixels, or null for an empty or atlas-rejected source raster.

Link copied to clipboard
val left: Float

left ink-quad offset.

Link copied to clipboard

source-axis directions for normalized ink bounds.

Link copied to clipboard

positive measured source dimensions rejected by the native 256-pixel atlas, without allocating their pixels.

Link copied to clipboard

right ink-quad offset.

Link copied to clipboard

horizontal and vertical shadow offset.

Link copied to clipboard
val top: Float

top ink-quad offset.