Skip to content

GlyphLayout

final class GlyphLayout<F extends IFontFace>
Package: dev.joid.lib.font.impl.glyph · Module: core · Source: GlyphLayout.java

A string laid out on one line, as the list of its glyph placements and its width.

GlyphTextRenderer.layout builds it: markup tags read, faces resolved, kerning and letter spacing applied.

ReturnsSignatureSummary
GlyphLayout<F>of(List<GlyphPlacement> placements, double width) factoryCreates a layout from its placements and its width.

ReturnsSignatureSummary
List<GlyphPlacement<F>>getPlacements()Returns the placements, in the order of the string, as a list you cannot change; characters that the face cannot draw are left out, except spaces.
doublegetWidth()Returns the width of the line in design pixels, without the letter spacing after the last glyph.

<F extends IFontFace> GlyphLayout<F> of(List<GlyphPlacement<F>> placements, double width) factory

Creates a layout from its placements and its width.

List<GlyphPlacement<F>> getPlacements()

Returns the placements, in the order of the string, as a list you cannot change; characters that the face cannot draw are left out, except spaces.

double getWidth()

Returns the width of the line in design pixels, without the letter spacing after the last glyph.


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