Some fonts have incorrect character mappings


#1

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 http://www.dafont.com/lcd-phone.font )
Visitor (from http://www.dafont.com/visitor.font )
Diskoteque (from http://www.1001fonts.com/font_details.html?font_id=1847 )
Metal Lord (from http://www.1001fonts.com/font_details.html?font_id=1960 )

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…

-Colin


#2

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


#3

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

-Colin