Skip to main content

Crate vertext_core

Crate vertext_core 

Source
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.
HorizontalBlock
Layout
LayoutConfig
Row
Table

Enums§

Block
HorizontalKind
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 Layout rather than assuming a direction.
Slot

Functions§

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.