Expand description
Breaking a shaped paragraph into rows.
The rules are the desktop engineβs (epaintβs), so a run laid out here breaks where the same run breaks on screen: a row ends at the last whitespace that fits, failing that at a dash or a punctuation mark, and failing that anywhere at all β a word wider than the wrap is broken per character rather than overrun.
StructsΒ§
- Candidates π
- Where a row could end, best first. The last whitespace is the break a reader expects; the rest are what a word too wide for the wrap falls back through.
- Fit π
- What a paragraph is broken to fit: the width a row may fill, and the height every row stands whether or not a glyph is on it.
EnumsΒ§
- Break π
- What ended a row: the paragraph it closes, or the wrap width it filled.
FunctionsΒ§
- is_cjk π
- A logogram or kana β a character that is a word, and so a place a row may end without a space.
- may_
begin_ πa_ row - https://en.wikipedia.org/wiki/Line_breaking_rules_in_East_Asian_languages
- right_
of π - rows_of π
- Stack
paragraphsβ each one a shaped run placed on a single endless row β into the rows that fitwrap. - shifted π
- stack π
- The rows in order, each at its own height below the one before.
- width_
of π