IFontFace
interface IFontFace
Known subtypes: MsdfFontFace
Package: dev.joid.lib.font.impl.glyph · Module: core · Source: IFontFace.java
One face of a glyph font, a weight and a style, with its metrics on 1 of the font size.
Description
Section titled “Description”MsdfFontFace implements it; implement it with your own GlyphTextRenderer for another kind of glyph font.
Every metric is on 1 of the font size: a line height of 1.2F at a size of 20 design pixels is 24 design pixels.
Learn more
Section titled “Learn more”Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
boolean | isItalic() abstract | If true, this face is italic. |
float | getAscender() abstract | Returns the height above the baseline, on 1 of the font size. |
float | getDescender() abstract | Returns the depth under the baseline, on 1 of the font size, negative below it. |
float | getLineHeight() abstract | Returns the height of one line, on 1 of the font size. |
float | getUnderlineY() abstract | Returns the position of an underline relative to the baseline, on 1 of the font size, negative below it. |
float | getUnderlineThickness() abstract | Returns the thickness of an underline, on 1 of the font size. |
String | getName() abstract | Returns the name of the face, shown in the warnings. |
FontWeight | getWeight() abstract | Returns the FontWeight of this face. |
float | getAdvance(int codepoint) abstract | Returns the distance from codepoint to the next character, on 1 of the font size. |
float | getKerning(int previous, int current) abstract | Returns the adjustment between previous and current, on 1 of the font size, 0F for none. |
boolean | hasGlyph(int codepoint) abstract | If true, this face can draw codepoint; the renderer skips a character it cannot draw, except a space. |
Method details
Section titled “Method details”isItalic
Section titled “isItalic”boolean isItalic() abstract
If true, this face is italic.
getAscender
Section titled “getAscender”float getAscender() abstract
Returns the height above the baseline, on 1 of the font size.
getDescender
Section titled “getDescender”float getDescender() abstract
Returns the depth under the baseline, on 1 of the font size, negative below it.
getLineHeight
Section titled “getLineHeight”float getLineHeight() abstract
Returns the height of one line, on 1 of the font size.
getUnderlineY
Section titled “getUnderlineY”float getUnderlineY() abstract
Returns the position of an underline relative to the baseline, on 1 of the font size, negative below it.
getUnderlineThickness
Section titled “getUnderlineThickness”float getUnderlineThickness() abstract
Returns the thickness of an underline, on 1 of the font size.
getName
Section titled “getName”String getName() abstract
Returns the name of the face, shown in the warnings.
getWeight
Section titled “getWeight”FontWeight getWeight() abstract
Returns the FontWeight of this face.
getAdvance
Section titled “getAdvance”float getAdvance(int codepoint) abstract
Returns the distance from codepoint to the next character, on 1 of the font size.
getKerning
Section titled “getKerning”float getKerning(int previous, int current) abstract
Returns the adjustment between previous and current, on 1 of the font size, 0F for none.
hasGlyph
Section titled “hasGlyph”boolean hasGlyph(int codepoint) abstract
If true, this face can draw codepoint; the renderer skips a character it cannot draw, except a space.
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
