June 30, 2008

Block-drawing characters in Firefox. WTF ?

Unicode defines a family of characters shaped like boxes of increasing height. Presumably useful for drawing diagrams in text. Something like this
x
xx
xxx
only fancier. The exact 8 characters in discussion have code points 0x2581-0x2588, and range from 1/8th to 8/8ths, i.e. full block. Here is a sample:
▁▂▃▄▅▆▇█
Now, correct me if I'm wrong, but those characters are only useful as soon as they are aligned with each other. You can't draw a diagram if one box is slightly offset - it turns out ugly. And so, can anyone tell why Firefox 2 renders the 4/8ths (half-block, code point 0x2584) and the 8/8ths (full block, code point 0x2588) shifted down a little ? Here, have a look:
This glitch makes it practically useless. WTF ?

4 comments:

Anonymous said...

Trying other browser, most render them like firefox, while in IE I get two extra vertical spaces instead

wiz said...

"▁▂▃▄▅▆▇█" shows me a perfect ladder in ff3 with default fonts on ubuntu.

wiz said...

Hahah, but not in comment up there (8

godDLL said...

http://tinyurl.com/5zlk7b
Here is Safari 3, also same kind of crap.