Module text_layout

Source
Expand description

Simple per-line metrics (fontdue-backed). Simple per-character layout helpers independent of Parley shaping.

Structs§

LineLayout
Per-line byte offsets and cumulative advances (simple fontdue metrics).

Functions§

caret_index_at_x
Returns the first cumulative-advance index at or beyond x.
caret_x_at
Maps a UTF-8 byte position to the preceding recorded X advance.
line_layout
Measures each Unicode scalar and records its next UTF-8 boundary.