MsdfMetrics
final class MsdfMetrics
Package: dev.joid.lib.font.impl.msdf · Module: core · Source: MsdfMetrics.java
The vertical metrics of an MSDF face, on 1 of the em.
Learn more
Section titled “Learn more”Creation
Section titled “Creation”| Returns | Signature | Summary |
|---|---|---|
MsdfMetrics | of(float lineHeight, float ascender, float descender, float underlineY, float underlineThickness) factory | Creates the metrics from the line height, the ascender, the descender, the underline position and the underline thickness, each on 1 of the em. |
Methods
Section titled “Methods”| Returns | Signature | Summary |
|---|---|---|
float | getLineHeight() | Returns the height of one line. |
float | getAscender() | Returns the height above the baseline. |
float | getDescender() | Returns the depth under the baseline, negative below it. |
float | getUnderlineY() | Returns the position of an underline relative to the baseline, negative below it. |
float | getUnderlineThickness() | Returns the thickness of an underline. |
Creation details
Section titled “Creation details”MsdfMetrics of(float lineHeight, float ascender, float descender, float underlineY, float underlineThickness) factory
Creates the metrics from the line height, the ascender, the descender, the underline position and the underline thickness, each on 1 of the em.
Method details
Section titled “Method details”getLineHeight
Section titled “getLineHeight”float getLineHeight()
Returns the height of one line.
getAscender
Section titled “getAscender”float getAscender()
Returns the height above the baseline.
getDescender
Section titled “getDescender”float getDescender()
Returns the depth under the baseline, negative below it.
getUnderlineY
Section titled “getUnderlineY”float getUnderlineY()
Returns the position of an underline relative to the baseline, negative below it.
getUnderlineThickness
Section titled “getUnderlineThickness”float getUnderlineThickness()
Returns the thickness of an underline.
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
