Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ceil ¶
Ceil rounds a measured width up to whole user units, so layout derived from it can never land a fraction of a pixel short.
func TruncRunes ¶
TruncRunes shortens s to at most n runes, marking the cut. It counts runes, never bytes: a byte slice through "—" emits invalid UTF-8.
func Wrap ¶
Wrap breaks s into lines no wider than maxW, splitting on spaces. A single word wider than maxW gets its own line rather than being cut: the canvas grows for it instead. It also returns the widest line it produced, which can exceed maxW: a single word longer than the limit has nowhere to break, so the caller has to widen its canvas rather than let SVG clip the overhang.
Types ¶
This section is empty.