Horrible Tahoma font rendering on Leopard

The default Tahoma font (that’s being shipped with Leopard) is rendered in a very ugly fashion by the juce font rendering routines.

The funny thing is that the microsoft version of Tahoma (that overrides the default one when present) is perfectly rendered.

How to reproduce, on a leopard box:

Open Font Book, disable non-apple Tahoma versions (such as the microsoft ones that come with microsoft office).

Launch the juce demo and select the Tahoma font.

Enjoy the glyph’s uglyness (check the numbers out, for instance) and compare with the font book renderings of the same font.

Anyway, a picture is worth a thousand words:

Any ideas on how to solve this issue?

Well that’s not actually tahoma! Look at the difference in the shapes, e.g the “J”. It looks to me like the nasty font that the OS substitutes when you try to display extended unicode characters, though why it return it in this context, I don’t know…

Can you reproduce this weird font selection behavior on your machine?
Any plans to fix it?
In the meantime, we’ll just use another font, but it would be nice to have all fonts treated equally, wouldn’t it?


It’s hardly fair to expect juce to cope with a crazy situation like that. If your system is screwed up enough to have two fonts with the same name, then it’s 50-50 which one you’ll get.

And if you’ve also gone around disabling fonts, then when you try to load them, the OS will substitute this crappy font instead, but the application can’t be expected to know that!

This situation is neither crazy, nor uncommon.
It just happens on a default, vanilla installation of Leopard.
I encountered it on two different, brand new MacBooks, right out of the box.

I mentioned the fact that the Office font was correctly rendered in the hope that it could give you a hint on what is actually happening, and also in case you have this pretty common piece of software already installed on your machine and want to reproduce the bug.

It’s really just a matter of launching the juce demo on Leopard and watching the Tahoma sample of the Fonts and Text pane.

Well it works with no trouble on my mac. It’s easy to make it happen by disabling a font (any font, not just tahoma). But if the font’s enabled, then it loads it fine as far as I can see.

Are you saying that brand new Macs have tahoma disabled?

Of course I’m not saying that :wink:

But still… This is very weird…

On the two MacBooks Pro (10.5.3) I have here, I double-checked that I have no font disabled, no Microsoft-specific fonts, and still have the problem.

I’d be really curious to know what differs between our machines!

Are we using the same juce demo? I did my tests with the one that’s available on the website. (http://www.rawmaterialsoftware.com/juce/downloads/jucedemo.dmg)

Don’t think the version of the demo would make a difference.

What you’re seeing is a font that the OS has substituted. And that’s what you’d expect if a font is disabled or missing. There’s no special cases here, it just asks for the typeface, and displays what the OS serves up…

I understand.

I don’t know how Font Book does get the correct font, though.

I tried toying around with the font folder and the font cache without any luck.

And now I’m out of ideas :frowning:

Well do these Macs that you’ve tried even have Tahoma installed?

Yes, they do.

Both .ttf files are in /Library/Fonts on the macs.

And FontBook correctly finds them.

Right, so are you telling me that on these machines there’s one copy of tahoma, which is definitely not disabled in fontbook, but which juce isn’t loading?

Yes. That’s what it looks like, unfortunately.

And all the other fonts are ok? And you’ve actually checked in fontbook that it’s not marked as “off”, like it was in your screenshot?

Yes, the other fonts seem fine, both in the demo and Font Book.
Tahoma is not marked off in Font Book, neither are any of the other fonts.
I also double checked in the System Information/Fonts section.
No fonts disabled there either.

Well, I’ve no idea! Unless you’re spelling the name wrong or something, I can’t think why it could possibly happen, or even how I’d recreate it on my machine…

I’m not even spelling anything. It’s the juce demo which enumerates the fonts.
I’m stuck here too.

Well, all I can suggest is stepping through the mac-specific code where it loads the font, and see if you can find any helpful error messages or spot any potential mistakes.

Will do, when I get a chance.
For now, using another font is just fine.