Expand description
The host-independent part of Vertext.
The one dependency is unicode-segmentation for UAX #29 grapheme cluster
boundaries. It is table-driven and no_std-capable, so it crosses
wasm32 unchanged; hand-rolling cluster boundaries would produce exactly
the near-miss rendering this library exists to end.
A host turns a Layout into HTML, a terminal preview, or a GPU scene. The
logical reading direction is always top-to-bottom and a source newline moves
to the column on its left.
Structs§
- Column
- Document
- A whole document: a sequence of blocks that advance in one direction.
- Horizontal
Block - Layout
- Layout
Config - Row
- Table
Enums§
- Block
- Horizontal
Kind - Progression
- Which way successive columns advance. This is a property of the script,
not of “vertical text”: CJK columns advance right-to-left, traditional
Mongolian advances left-to-right. Hosts must read it from the
Layoutrather than assuming a direction. - Slot
Functions§
- is_
mongolian - Whether this character belongs to the Mongolian script.
- layout_
text - Creates a top-to-bottom layout. Each source newline starts a new column to the left. Whitespace separates Latin words but does not create an empty slot. Long Latin words use predictable hard hyphens; dictionary hyphenation is intentionally a host-configurable future enhancement.
- prefers_
horizontal - Whether a run of text is better set horizontally than vertically.