Resolves a typed float array storing the advances of each of the label's characters.
Label to resolve advances for.
Text to compute advances for, if none is given, label.text is used.
Creates a sub list of fragments that fit into threshold. The last fragment might be adjusted in order to cram as many characters as possible for the elide. Reverse flag can be used do start left or right.
Threshold in typesetting space.
Pre-computed label fragments.
Pre-accumulated widths of the label fragments.
Advances in order to reduce lookups.
Kernings in order to reduce lookups.
-If enabled, the right side elide fragments will be collected and adjusted. Left side otherwise.
Computes the left and right side thresholds for elide computation.
Label to query elide mode and line width from.
Pre-computed width of the full ellipsis (t avoid re-computation).
Compute fragment widths without kernings w.r.t. preceding and subsequent fragments.
-
-
-
-
Create array of word, delimiter, and line feed fragments. A fragment thereby denotes the start and exclusive end index as well as the type. The array is intended to favor maintainability over performance.
Label to create fragments for.
Returns [minX, minY, minZ, maxX, maxY, maxZ] of the vertices coordinates, i.e., origins, origins + tangents, origins + ups, from which a bounding rectangle can be calculated.
Glyph vertices to be transformed (expected untransformed, in typesetting space).
Vertex index to start alignment at.
Vertex index to stop alignment at.
Resolves a typed float array storing the kernings of each of the label's characters.
Label to resolve kernings for.
Text to compute advances for, if none is given, label.text is used.
Compute an initial line anchor w.r.t. the targeted anchoring.
Label to adjust the y-positions for.
Returns a vec2 [min, max] containing the minimum and the maximum of the given values.
the current minimum (e.g., initialized to +Infinity)
the current maximum (e.g., initialized to -Infinity)
find the maximum and minimum of the given values
Create and transform glyph vertices for rendering.
Label providing transform data, e.g., alignment and static transform.
Glyph vertices to apply transformations to.
Indices of glyph vertices on same lines to apply line-based transformations.
Adjusts the vertices for a line after typesetting (done due to line feed, word wrap, or end of line) w.r.t. the targeted line alignment.
Width of the line (e.g., typesetting position at the end of the line in typesetting space).
Targeted alignment, e.g., left, center, or right.
Glyph vertices for rendering to align the origins' x-components of (expected untransformed).
Vertex index to start alignment at.
Vertex index to stop alignment at.
Computes origin, tangent, and up vector for every vertex of in the given range.
Transformation to apply to every vertex.
Glyph vertices to be transformed (expected untransformed, in typesetting space).
Vertex index to start alignment at.
Vertex index to stop alignment at.
Typesets the given label, transforming the vertices in-world, ready to be rendered.
The label that is to be typeset.
in/out The glyph vertices, a prepared (optionally empty) vertex storage.
[minX, minY, minZ, maxX, maxY, maxZ] is updated in-place
[minX, minY, minZ, maxX, maxY, maxZ] used to update currentRectangle
Configuring the vertex for a given glyph to be rendered. If no vertex is given or the glyph is not depictable, this method immediately exits at the beginning.
Font face to be applied for setting up the vertex.
Typesetting position which is the not-yet-transformed position the glyph will be rendered at.
Glyph that is to be rendered/configured.
Glyph vertex store required for rendering.
Glyph vertex index for store manipulation.
The typesetter is responsible for layouting text on the screen or in a virtual space. It takes a label, which defines where it wants to appear (@see Label), and a font face that is used to display the text, and computes the actual position for each glyph. Its output is a vertex array, which describes the glyphs position and appearance on the screen/in the scene and which can be rendered using a LabelRenderPass.