Measures a code point as zero, one, or two columns
All 23 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. The script of the code point decides which. An ordinary letter, digit or sign takes one column, in any alphabet. A glyph drawn on a square body takes two columns. A code point that draws no glyph of its own takes none. There are two kinds of such code point: a control character, and a mark that combines with the letter before it.
Each row holds the code point as a number, because the two 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. Two columns: the ideograph for middle, the ideograph for you, the hiragana ko, the Hangul syllable guk, a grinning face, fullwidth A. No columns: the null character, a line feed, a tab, a combining acute accent, a combining diaeresis.
| Scenario | Code point | Width? |
|---|---|---|
| An ordinary letter, digit or sign |
| 1 |
| A glyph drawn on a square body |
| 2 |
| A control character or a combining mark |
| 0 |