Measure Twice, Draw Once
Mostly a width-measurement release, courtesy of some Ultraviolet and x/ansi bumps, plus a table fix.
Emoji
Ultraviolet now asks the terminal at startup whether it supports Unicode core mode (DEC mode 2027), and when it does, measures widths the same way the terminal does. No more drifting borders on rows with ⚠️ and friends.
It also had a four-column cap on cell width, which meant anything wider was dropped from the screen entirely — 👨👩👧👦 is eight columns. That cap is gone.
Hindi
Terminals without mode 2027 advance the cursor once per codepoint and don't know about cluster boundaries. Unicode 15.1 merged Indic conjuncts into single clusters, so स्ते is one cluster that those terminals still paint in two columns. Measuring it as a unit put everything after it in the wrong place.
The wcwidth path now measures per codepoint, matching what those terminals actually do. If you're rendering through Bubble Tea, Devanagari should line up.
Tables
Columns no longer shrink to zero. There's now a minimum width floor of padding plus one character, with a fallback to the old behavior when the width budget is impossible. Thanks to @taciturnaxolotl!
Heads up
Canvas.Render() now trims trailing whitespace. Expect goldens to move.
Changelog
Fixed
- d231906: fix(table): prevent columns from shrinking to zero width (#671) (@taciturnaxolotl)
Thoughts? Questions? We love hearing from you. Feel free to reach out on X, Discord, Slack, The Fediverse, Bluesky.