Is there a version of the Arial or Tahoma font with monospaced digits and spaces?
Posted
by
rossmcm
on Super User
See other posts from Super User
or by rossmcm
Published on 2011-08-26T03:37:21Z
Indexed on
2012/09/21
15:42 UTC
Read the original article
Hit count: 337
Windows
|true-type-fonts
The digits in the Arial font supplied with Windows are monospaced, in that they each take up the same horizontal space, but they seem to have neglected to provide a "monospaced" version of the space character. This means that you can't format a column of digits right-justified in (say) 12 spaces and have the right-hand edge be aligned. For example:
1
12
123
1234
12345
1234567
12345678
123456789
1234567890
works because the font used for code examples has spaces the same width as digits. This however doesn't work if the same text is displayed in Arial (I can't demonstrate because I can't figure out how to defeat SU's reformatting at the moment!).
It just so happens that with Tahoma 8 point you can cheat because a space is exactly half the number of pixels as a digit, but that is messy and very specific.
© Super User or respective owner