Some fonts have incorrect character mappings


I’m experiencing a rather bizarre issue and it doesn’t seem like anyone else has had the problem (from searching).

For certain fonts on my system, the character mapping is wrong; there is some kind of “offset”. By that I mean, “Aa” may be displayed as “Cc”, “Bb” as “Dd”, and so on (though the incorrect mapping is not always so direct). I’m running OS X.6 with Juce 1.52.110, and the issue occurs with the unmodified Juce demo (and elsewhere). This is more often true for .ttf fonts I downloaded from the net but it also happens with some system fonts. Here are some examples:
LiHei Pro (Mac OS X Default font)
LiSong Pro (Mac OS X Default font)
Heiti SC and TC (Mac OS X Default fonts)
LCD Phone (from )
Visitor (from )
Diskoteque (from )
Metal Lord (from )

These fonts all display fine in other apps. This problem is not apparent in most fonts in my system. I’ve attached a screenshot of Juce Demo with the LiHei Pro font selected (note that LCD phone, Metal Lord and LiSong Pro are also having issues in the font list). Any tips? I hope this issue is not limited to my system, and maybe others just haven’t noticed…



Weird. Looks like it’s the unicode->glyph number mapping that’s going astray… Thanks, I’ll investigate.


Maybe helpful - if I convert to, say, .otf using (or probably any similar conversion tool) it seems to fix this problem (at least for the one font I tried).