Skip to content

MsdfGlyph

final class MsdfGlyph
Package: dev.joid.lib.font.impl.msdf · Module: core · Source: MsdfGlyph.java

One glyph of an MSDF face, with its advance and where it sits on the line and in the atlas.

ReturnsSignatureSummary
MsdfGlyphof(int codepoint, float advance, MsdfBounds planeBounds, MsdfBounds atlasBounds) factoryCreates the glyph of codepoint with its advance on 1 of the em, its plane bounds and its atlas bounds; a glyph without bounds, such as a space, has null for both.

ReturnsSignatureSummary
intgetCodepoint()Returns the character of the glyph.
floatgetAdvance()Returns the distance to the next glyph, on 1 of the em.
MsdfBoundsgetPlaneBounds()Returns the bounds of the glyph around its origin on the baseline, on 1 of the em with Y up, or null for a glyph that draws nothing.
MsdfBoundsgetAtlasBounds()Returns the bounds of the glyph in the atlas image, in pixels, or null for a glyph that draws nothing.

MsdfGlyph of(int codepoint, float advance, MsdfBounds planeBounds, MsdfBounds atlasBounds) factory

Creates the glyph of codepoint with its advance on 1 of the em, its plane bounds and its atlas bounds; a glyph without bounds, such as a space, has null for both.

int getCodepoint()

Returns the character of the glyph.

float getAdvance()

Returns the distance to the next glyph, on 1 of the em.

MsdfBounds getPlaneBounds()

Returns the bounds of the glyph around its origin on the baseline, on 1 of the em with Y up, or null for a glyph that draws nothing.

MsdfBounds getAtlasBounds()

Returns the bounds of the glyph in the atlas image, in pixels, or null for a glyph that draws nothing.


fluent returns the instance, typed for chaining · factory creates an instance · signal also accepts a value that follows signals, as a signal, an expression or a lambda (When does JOID compute this value again?) · hook called by JOID, override it · abstract you implement it · default interface method with a body · static called on the class · protected visible to subclasses

Report a problem with this page