Post Archive
› September 24, 2003
Windows loves Arial
Perhaps I am misunderstanding, but it seems that Windows browsers love Arial. They love Arial so much in fact, that they will assume that if you specify "Helvetica", you probably meant Arial. Case in point, the CSS for Web-Graphics. My goal is to have the following font logic hold true: Helvetica is the first choice, if that is not available, then use Verdana, but never ever use Arial unless you have no other choice.
This is the font order I specify: Verdana, Geneva, Lucida, sans-serif. I then trick Win IE into avoiding the Helvetica problem by hiding the next font order from it: Helvetica, Verdana, Geneva, Lucida, sans-serif. So for Win IE, the secondary choice of Verdana shows up (not arial), and for advanced browsers with Helvetica, my first choice font shows up. The problem that remains, boiled down, is that Mozilla browsers seem to interpret Helvetica into Arial, and I don't think there is a work-around.
Comments
1. September 24, 2003 10:50 PM
2. September 25, 2003 12:17 AM
dclay Posted…
Hmmm, that explains why I'm always laughing:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes"Helvetica”=”Curlz, Comic Sans”
3. September 25, 2003 12:38 AM
Nate Posted…
Marty - it sounds like you're onto something, I'll try removing that key to see if you've isolated it. dclay you've outdone yourself - registry humor, I can't believe it.
4. September 25, 2003 12:48 AM
Nate Posted…
Nope, removing that key didn't seem to change things, perhaps the font substitution is in more than one part of the registry? Obviously the larger solution would be to find some sort of CSS workaround, although I don't know how many people have this helvetica/arial issue come up for them in their designs. Am I in a minority? (consisting of people who really like helvetica and really don't like Arial)
5. September 25, 2003 11:31 AM
Marty Posted…
"Where there's one, there's many."
A quick search of the registry pulled up more references to Helvetica mapped to Arial than the above key on my installations of XP. While it would be nice to nail down exactly what reference (or combination) is causing the Arial display, the larger solution (as you mention) is a CSS workaround. Unfortunately, for those of us without Helvetica installed, Windows insistence to replace it with Arial may prove a tough obstacle.
I've spent a few looking through some options, but have come up empty so far.
6. September 25, 2003 12:20 PM
Nate Posted…
I wonder if this behavior actually constitutes a bug in Mozilla. Especially when Arial is specified later in the font list (e.g. Helvetica, Verdana, Geneva, Lucida, Arial, sans-serif). One would think that in that example, the substitution should really not occur unless the user somehow ended up with a computer that doesn't have Helvetica, Verdana, Geneva or Lucida.
7. September 25, 2003 01:25 PM
Nate Posted…
I should also point out that Opera for Windows seems to ignore the Registry Key and follows the font list order perfectly.
8. September 29, 2003 08:35 AM
9. September 29, 2003 09:41 AM
Nate Posted…
Ian, yes that would make sense - I guess I was expecting someone to write in and tell me why I'm all wrong. Given that it hasn't happened (yet), I've filed Bug #220657 with corresponding test page here.
10. September 29, 2003 12:28 PM
11. September 29, 2003 02:44 PM
Felix Miata Posted…
Between Helvetica and Arial, I prefer Arial. Either is preferable to Verdana, except possibly at font-size: 10px or smaller. On my own systems I remove Verdana. Verdana's giant x height is ugly from around size 15px up.
Anyway, on my windoze systems, even in IE all I see is Arial on your whole test page. In contrast, on a fresh Mandrake Linux 9.1 install, which has neither Verdana nor Arial, I can see in 1.5rc1 no material difference on that page from what I see using IE. IOW, Helvetica on Linux looks just like Arial on windoze. You can see what I see when Helvetica is called for on a screenshot, attachment to a font bug I filed on Mandrake.
Maybe you can find a clue to Mozilla behavior on an LXR Arial search. It seems to be preferred to Helvetica in Mozilla style rules.
12. September 30, 2003 06:18 PM
13. September 30, 2003 06:32 PM
Nate Posted…
Michael, you're right - I could remove Arial from my windows machines, and I'd be a happy camper - but I can't expect viewers of websites I markup to do the same. Also, I'm not completely anti-Arial.
The main point I'm making is that Windows operating systems have these built in font substitution mechanisms, and if Windows based browsers don't specifically circumvent them, they can't follow the W3C recommendations for how CSS font specification works. Since it's somewhat undetermined when a new version of WinIE will be released (and if it will fix this bug), at least we can suggest that the Mozilla browsers get it right - like Opera does.
Of course I can't claim to have had this all figured out when I first made this post - it thanks to all the helpful comments that I realized this was a true bug.
14. September 30, 2003 06:35 PM
Ian Hickson Posted…
Well, technically, as was pointed out on the Mozilla bug about this, Windows does have a "Helvetica" font installed. It happens to look identical to Arial and be stored in the same file, but officially at least, there is a Helvetica font installed.
I suppose it's arguable both ways.
15. September 30, 2003 06:43 PM
Nate Posted…
Wow that's nutz! I didn't realize this was discovered, until you just clarified it. Is Helvetica *really* installed if it's not accessible like other fonts in your system, and looks exactly like Arial? Anyways, my vote is for Opera-like behavior because it is much more predictable for CSS authors and does not provide any restrictions if implemented. I guess I should be commenting this on the bug page.
16. January 17, 2004 05:33 PM
codeman38 Posted…
I submitted a bug about this, #145288, a while back and it ended up being marked as "WONTFIX" because the real Helvetica isn't as well-hinted as Arial (though I still like it better). I suggested having an option to turn font subtitution on or off,, but it doesn't seem to have been implemented yet...
For the record, I have the real Helvetica font installed on my system, and I even removed the font substitution key for Helvetica/Arial in the registry...
17. January 17, 2004 05:39 PM
codeman38 Posted…
Actually, I just looked at the Mozilla executable in a hex editor, and it seems to have these font substitutions hard-coded rather than leaving the decision up to the OS! Very bad idea. This definitely needs to be fixed, now that I look back at it...
18. January 17, 2004 05:52 PM
codeman38 Posted…
...or at least that's the case in Firebird. In Seamonkey (regular Mozilla), the font substitution is hard-coded into gkgfxwin.dll - possibly stored in the shared GRE directory instead of the Mozilla home directory - instead.
But it's most definitely there.
19. January 18, 2004 12:39 PM
liorean Posted…
As the Arial file includes an entry for a font named Helvetica, which just happens to be the same as Arial, I can't say I think Mozilla does the wrong thing. Rather, I would say Mozilla would be wrong to NOT use the Helvetica version provided by Arial, when the CSS font-family property specifically asks for Helvetica. The fault here lies rather with Microsoft including an entry for Helvetica in their Arial file than in Mozilla's handling of the issue. When Mozilla detects an entry for a font with the name it is asking for, it should use it.
Marty Posted…
Your Arial woes could very well be due to the following Windows registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes\"Helvetica"="Arial"
It's very probable that since Mozilla cannot find the Helvetica font installed, and considering there is no equivalency setting directly in Mozilla (similar to the registry key above), Windows is directing it to equate Helvetica to Arial before passing on the font altogether.