Discussion of figure width.
Ordinary digits 0-9 | |||||||||
---|---|---|---|---|---|---|---|---|---|
0 0 | 1 1 | 2 2 | 3 3 | 4 4 | 5 5 | 6 6 | 7 7 | 8 8 | 9 9 |
In many fonts where other characters are of variable width, the numerals of code points 30 through 39 (table above) are all of the same width (tabular figures). The purpose is to allow columns of numbers to align, which is essential in much financial and technical reporting. The ordinary space character ( ) is not necessarily of that same width, so a special character, known as the figure space (  or  ) has been introduced. Also available is the figure dash (‒).
For the font being employed by the user's browser, the table below will reveal whether the ten numerals, the figure space, and the figure dash are really all the same width. The bold-face numbers with colons indicate how many figure spaces or dashes are included in each row:
figure space | figure dash | |||
---|---|---|---|---|
source | result | source | result | |
0: 0123456789 1:  123456789 2:   23456789 1: 0 23456789 2: 0  3456789 |
0: 0123456789 1:  123456789 2:   23456789 1: 0 23456789 2: 0  3456789 1: 01 3456789 2: 01  456789 1: 012 456789 2: 012  56789 1: 0123 56789 2: 0123  6789 1: 01234 6789 2: 01234  789 1: 012345 789 2: 012345  89 1: 0123456 89 2: 0123456  9 1: 01234567 9 2: 01234567   1: 012345678  0: 0123456789 |
0: 0123456789 1: ‒123456789 2: ‒‒23456789 1: 0‒23456789 2: 0‒‒3456789 |
0: 0123456789 1: ‒123456789 2: ‒‒23456789 1: 0‒23456789 2: 0‒‒3456789 1: 01‒3456789 2: 01‒‒456789 1: 012‒456789 2: 012‒‒56789 1: 0123‒56789 2: 0123‒‒6789 1: 01234‒6789 2: 01234‒‒789 1: 012345‒789 2: 012345‒‒89 1: 0123456‒89 2: 0123456‒‒9 1: 01234567‒9 2: 01234567‒‒ 1: 012345678‒ 0: 0123456789 |
In the font that happens to be installed on the author's own computer, the figure space and figure dash are indeed of the correct width, but they are taller than the numerals, thus affecting line spacing. This reflects the reality that hardly any Unicode font is perfect; and perfection will always be a difficult goal, because Unicode has myriads of characters.
Here are similar tables with plus (+ or +) and minus (− or −) signs:
plus sign | minus sign | |||
---|---|---|---|---|
source | result | source | result | |
0: 0123456789 1: +123456789 2: ++23456789 1: 0+23456789 2: 0++3456789 |
0: 0123456789 1: +123456789 2: ++23456789 1: 0+23456789 2: 0++3456789 1: 01+3456789 2: 01++456789 1: 012+456789 2: 012++56789 1: 0123+56789 2: 0123++6789 1: 01234+6789 2: 01234++789 1: 012345+789 2: 012345++89 1: 0123456+89 2: 0123456++9 1: 01234567+9 2: 01234567++ 1: 012345678+ 0: 0123456789 |
0: 0123456789 1: −123456789 2: −−23456789 1: 0−23456789 2: 0−−3456789 |
0: 0123456789 1: −123456789 2: −−23456789 1: 0−23456789 2: 0−−3456789 1: 01−3456789 2: 01−−456789 1: 012−456789 2: 012−−56789 1: 0123−56789 2: 0123−−6789 1: 01234−6789 2: 01234−−789 1: 012345−789 2: 012345−−89 1: 0123456−89 2: 0123456−−9 1: 01234567−9 2: 01234567−− 1: 012345678− 0: 0123456789 |
The present author has not been able to find within Unicode a corresponding figure period or figure comma. Hence the ordinary period and comma are widely used as a decimal point and a thousands separator, but which character is used for which purpose varies from place to place. In some fonts, the ordinary period (. or .) and comma (, or ,) are not the same width as the digits, incurring risk that characters will appear in misaligned columns.
In the table below, the ordinary period and comma are used to display how the font in the user's computer behaves.
period | comma | |||
---|---|---|---|---|
source | result | source | result | |
0: 0123456789 1: .123456789 2: ..23456789 1: 0.23456789 2: 0..3456789 |
0: 0123456789 1: .123456789 2: ..23456789 1: 0.23456789 2: 0..3456789 1: 01.3456789 2: 01..456789 1: 012.456789 2: 012..56789 1: 0123.56789 2: 0123..6789 1: 01234.6789 2: 01234..789 1: 012345.789 2: 012345..89 1: 0123456.89 2: 0123456..9 1: 01234567.9 2: 01234567.. 1: 012345678. 0: 0123456789 |
0: 0123456789 1: ,123456789 2: ,,23456789 1: 0,23456789 2: 0,,3456789 |
0: 0123456789 1: ,123456789 2: ,,23456789 1: 0,23456789 2: 0,,3456789 1: 01,3456789 2: 01,,456789 1: 012,456789 2: 012,,56789 1: 0123,56789 2: 0123,,6789 1: 01234,6789 2: 01234,,789 1: 012345,789 2: 012345,,89 1: 0123456,89 2: 0123456,,9 1: 01234567,9 2: 01234567,, 1: 012345678, 0: 0123456789 |
The present author has also been unable to find Unicode support for special versions of letters "A"-"F" or "a"-"f" whose glyphs would assuredly be the same width as those of digits 0-9. These would be needed for columns of properly-aligned hexadecimal figures, as often appear in computer science literature. The Unicode proposal N2677 of Ricardo Cancho Niemietz in 2003 would have added "A"-"F" for hexadecimal use, but was rejected. Importantly, this proposal would also have specified hexadecimal semantics to the six characters.
For revealing whether columns are aligned in the user's font, the examples below use the ordinary "A"-"F" (A-F) and "a"-"f" (a-f) of Unicode.
upper case | lower case | |
---|---|---|
0: 0123456789 1: A123456789 2: AB23456789 1: 0B23456789 2: 0BC3456789 1: 01C3456789 2: 01CD456789 1: 012D456789 2: 012DE56789 1: 0123E56789 2: 0123EF6789 1: 01234F6789 2: 01234FA789 0: 0123456789 |
0: 0123456789 1: a123456789 2: ab23456789 1: 0b23456789 2: 0bc3456789 1: 01c3456789 2: 01cd456789 1: 012d456789 2: 012de56789 1: 0123e56789 2: 0123ef6789 1: 01234f6789 2: 01234fa789 0: 0123456789 |
The present author's workaround is to specify a monospace font in HTML by means of the tags <tt> and </tt>.
Monospace characters "𝙰"-"𝙵" (𝙰-𝙵) or "𝚊"-"𝚏" (𝚊-𝚏) may suffice for some purposes. They come from a 26-letter alphabet.
upper case | lower case | |||
---|---|---|---|---|
source | result | source | result | |
0: 0123456789 1: 𝙰123456789 2: 𝙰𝙱23456789 1: 0𝙱23456789 2: 0𝙱𝙲3456789 |
0: 0123456789 1: 𝙰123456789 2: 𝙰𝙱23456789 1: 0𝙱23456789 2: 0𝙱𝙲3456789 1: 01𝙲3456789 2: 01𝙲𝙳456789 1: 012𝙳456789 2: 012𝙳𝙴56789 1: 0123𝙴56789 2: 0123𝙴𝙵6789 1: 01234𝙵6789 2: 01234𝙵𝙰789 0: 0123456789 |
0: 0123456789 1: 𝚊123456789 2: 𝚊𝚋23456789 1: 0𝚋23456789 2: 0𝚋𝚌3456789 |
0: 0123456789 1: 𝚊123456789 2: 𝚊𝚋23456789 1: 0𝚋23456789 2: 0𝚋𝚌3456789 1: 01𝚌3456789 2: 01𝚌𝚍456789 1: 012𝚍456789 2: 012𝚍𝚎56789 1: 0123𝚎56789 2: 0123𝚎𝚏6789 1: 01234𝚏6789 2: 01234𝚏𝚊789 0: 0123456789 |