Skip to content

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.

ReturnsSignatureSummary
MsdfMetricsof(float lineHeight, float ascender, float descender, float underlineY, float underlineThickness) factoryCreates the metrics from the line height, the ascender, the descender, the underline position and the underline thickness, each on 1 of the em.

ReturnsSignatureSummary
floatgetLineHeight()Returns the height of one line.
floatgetAscender()Returns the height above the baseline.
floatgetDescender()Returns the depth under the baseline, negative below it.
floatgetUnderlineY()Returns the position of an underline relative to the baseline, negative below it.
floatgetUnderlineThickness()Returns the thickness of an underline.

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.

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.


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