Measures a code point as zero, one, or two columns
All 28 scenarios hold
The formatter measures alignment in terminal display columns, not in characters. These rules say how wide a value renders in a monospaced font. The Column width feature and the Cell padding and alignment feature build on them.
A code point renders at one of three widths, by its Unicode properties. An ordinary letter, digit or sign takes one column, in any alphabet, and so does a symbol that Unicode draws as text by default. A glyph drawn on a square body takes two columns: an East Asian wide or fullwidth character, or an emoji that Unicode draws as a picture. A code point that draws no glyph of its own takes none: a control character, a format character, a mark that combines with the letter before it, and a Hangul vowel or final consonant that joins a syllable.
Each row holds the code point as a number, because the zero-width kinds have no glyph to write. Each row carries one code point per script or kind of its width:
One column: A, z, 0, æ, «, alpha, Cyrillic pe, Arabic meem, Hebrew shin, a box-drawing corner, the euro sign, the summation sign, the sun symbol. Two columns: the ideograph for middle, the ideograph for you, the hiragana ko, the Hangul syllable guk, a grinning face, fullwidth A, a Tangut ideograph. No columns: the null character, a line feed, a tab, a combining acute accent, a combining diaeresis, a soft hyphen, the zero-width joiner, the Hangul vowel a.
| Scenario | Code point | Width? |
|---|---|---|
| An ordinary letter, digit or sign |
| 1 |
| A glyph drawn on a square body |
| 2 |
| A code point that draws no glyph of its own |
| 0 |