Tahoma
Was plumbing the depths of my ignorance today and got a solid ping at about 1:00 p.m. when I confirmed that, although I’ve read about it on numerous occasions I’d really learned nothing about Unicode, character sets, glyphs or even the difference between a browser and an operating system.
I wanted to figure out why I am able use some special characters (such as →
, aka. rarr
, the “rightwards arrow”) in the title
element of a web page and have them display as intended in the titlebar of Mac browsers, then get nothing but those nasty squares in the titlebar of browsers running in XP (with the curious exception of Safari, version 3.0.4 beta). I tested all of these during my lunch hour, which process directly preceded a fairly hazy epiphany that I had wasted all morning due to several dumbass assumptions.
One of these was that I had seen rarr
in the titlebar of Firefox windows on the PC before, so I didn’t question that. This led me to spend a lot of time setting up a series of test pages using different doctypes, poring over the W3C specs, and thinking that eventually I’d hit on the answer. Related thoughts included numerical names, since they are so far down the Unicode chart (e.g. #8594
instead of rarr
), strict doctypes and source order.
Despite being under-caffeinated, I did notice that the entities were working perfectly for text rendered in the viewport on my Windows browsers (Firefox, Opera, both IEs), and also in browsers’ bookmarks lists. And then there was Safari on Windows, where rarr
put in a confident appearance in the weirdly inappropriate brushed metal titlebar, but failed to show down in the taskbar.
Cogs ground. Stomach rumbled. Vague thoughts slowly caught up with each other, eventually, inevitably rear-ending each other. No, chief. The reason why you can’t get those arrows to appear in the titlebar is because the titlebar belongs to the operating system, except for Safari who apparently belongs to Steve. (Really, what do I know? I am making this up as I go along.) On Windows XP the standard system font is Tahoma. And guess what Tahoma doesn’t have?
Why yes, it’s rightwards arrows! Or arrows of any kind! Neither diamonds, nor hearts, nor spades or clubs for that matter. In fact, a great many of the HTML entities you cannot have. Andrew Thompson’s excellent Unicode Font Inspection Tool for OS X can give you a sense of it. Which left me coming back to one thing over and over for the rest of the day. If Windows 2000 and XP handle Unicode natively, why does the default system font have so many missing glyphs? It’s nice enough to look all day, sure, but why accept that kind of limitation?
Tahoma debuted in in 1995, when Microsoft released you-know-what. Matthew Carter designed it for them, which itself was a big deal. Version 1.00 supported a relatively narrow Unicode range, and I’m assuming it didn’t support that many glyphs. According to Unicode Font Info I have version 1.50 on my Mac, which contains 246 glyphs (compared with 2,826 for my version of Lucida Grande, the system font on OS X). Yet Windows XP SP2, shipped with Tahoma 3.14, which contains 2,034 glyphs… but still no love for rarr
.
Oh well, since everyone’s rushing out to get Vista it won’t be long before Segoe UI, with its 2,843 glyphs (one of which must surely be rarr
) replaces Tahoma and I can go about my business of filling the titlebar with arrows on both platforms. That will be a happy day, and long overdue.
Hi! Thanks a lot for this post. I was having this problem, that a unicode character was being displayed only in Vista, but never in XP or 2k.
After hours of Googling I finally found your post, and immediately went to MS Word to check it – and as you said – Tahoma font in Win XP simply does not have the characters I needed. This is something I never realized until now.
But can you tell me how you actually resolved this problem? Is there a special font in XP or 2k which should be used whenever you need a special glyph?
September 30th, 2008 at 8:45 am #
But can you tell me how you actually resolved this problem?
vekipeki, I resolved it by not using arrows in the title—although you can specify fonts through CSS, these rules only take effect inside the viewport. Styling of the browser chrome (including the titlebar) is controlled either by the operating system or by the browser itself (e.g Safari does render the arrows). I don’t know how Safari does it—perhaps it substitutes Tahoma for glyphs in another font? But in terms of web authoring you can’t do anything about it. (Or if you can, then you shouldn’t!)
September 30th, 2008 at 7:09 pm #