Why is tab unaffected by font whereas space is affected?
richard.wordingham at ntlworld.com
Fri Apr 17 10:09:41 CDT 2020
On Fri, 17 Apr 2020 13:42:34 +0000
"Costello, Roger L. via Unicode" <unicode at unicode.org> wrote:
> Next, I place a tab character before the string:
> a b
> I set the font of the tab character to Calibri. I note the position
> of the string. Then, I set the font of the tab character to Courier.
> The string is at the same position. Why is that? Why is the space
> character affected by font whereas the tab character is not?
In some editors, e.g. Emacs 24.4.2, changing the font does
significantly change the position. (For most Emacs modes, one nowadays
has to specify the character as U+0009 to enter the tab as a character.)
The first point is that tab positions are not well defined. For use
with a fixed width font, it makes sense for tab positions to be every
so many characters; the natural assumption is that the user may want a
character-cell device. With proportional width fonts, this is not
possible, and so I believe chaos is to be expected for positioning by
tabs. Word processors may be expected to have tab positions defined in
points or similar, rather than character widths.
More information about the Unicode