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.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
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. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
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. |
Creation details
Section titled “Creation details”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.
Method details
Section titled “Method details”getCodepoint
Section titled “getCodepoint”int getCodepoint()
Returns the character of the glyph.
getAdvance
Section titled “getAdvance”float getAdvance()
Returns the distance to the next glyph, on 1 of the em.
getPlaneBounds
Section titled “getPlaneBounds”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.
getAtlasBounds
Section titled “getAtlasBounds”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
