API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

I

interfaceLineShaper

@codexo/exojs / rendering / stable

How a laid-out line is turned into something placeable when the engine has to hand the whole line to the browser's text engine as one shaping unit. Two implementations exist and the layout pass cannot tell them apart: `ShapedTextMetrics` answers measurements only and allocates no GPU resource, `ShapedTextSource` also rasterizes. That is what keeps `Text.measure()` free of render allocations while giving it the same numbers the node will use.

0
props
3
methods
0
events
Import
import { LineShaper } from '@codexo/exojs'

How a laid-out line is turned into something placeable when the engine has to hand the whole line to the browser's text engine as one shaping unit.

Two implementations exist and the layout pass cannot tell them apart: `ShapedTextMetrics` answers measurements only and allocates no GPU resource, `ShapedTextSource` also rasterizes. That is what keeps `Text.measure()` free of render allocations while giving it the same numbers the node will use.

Methods3
A solid texel on the pages this shaper rasterizes into, for decoration quads. A measurement-only shaper owns no pages and omits it, which reads as "no decorations", exactly as it does on a glyph provider.
measureLine(line: string, fontSize: number): number
Logical advance width of line shaped as one contextual unit. Widths of parts do not add up for contextual text, so a wrap candidate has to be measured whole rather than assembled from its words.
The whole line as one placeable glyph. A measurement-only shaper answers with a real advance and no geometry, exactly as a glyph-metrics provider does.
Source