Glyphs
final class Glyphs
Package: dev.joid.tool.msdf.font · Module: tool-msdf · Source: Glyphs.java
Reads the glyphs of a font with the font of Java: codes, advances, line metrics and outlines.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
Font | load(byte[] data) static | Returns the font of the bytes. |
int | code(Font font, int codepoint) static | Returns the glyph code of the code point, 0 when the font has none. |
double | advance(Font font, int codepoint) static | Returns the advance of the code point, in ems. |
double[] | metrics(Font font) static | Returns the line height, the ascender, the descender, the underline position and the underline thickness, in ems. |
Shape | outline(Font font, int codepoint) static | Returns the outline of the code point, with its contours oriented. |
Method details
Section titled “Method details”Font load(byte[] data) static
Returns the font of the bytes.
int code(Font font, int codepoint) static
Returns the glyph code of the code point, 0 when the font has none.
advance
Section titled “advance”double advance(Font font, int codepoint) static
Returns the advance of the code point, in ems.
metrics
Section titled “metrics”double[] metrics(Font font) static
Returns the line height, the ascender, the descender, the underline position and the underline thickness, in ems.
outline
Section titled “outline”Shape outline(Font font, int codepoint) static
Returns the outline of the code point, with its contours oriented.
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
