Custom fonts have vertical offset on iPad vs simulator

I found a TrueType font I was able to get to work on both the simulator and on my iPad. But the vertical position of the lettering (on a button) is off by several pixels. I didn’t see this problem with the built-in fonts. It’s frustrating to have to do multiple builds/installs of an app onto my iPad to get the adjustment correct.

Fyi, the font I was working with is called GrilledCheeseBTN.ttf

A side question… is it only TrueType fonts that can be used as custom fonts? If so, I didn’t see any mention of that.

I actually tried it with some TT fonts (older ones? without the .ttf extension) and couldn’t get them to show up on the device. [import]uid: 9905 topic_id: 6285 reply_id: 306285[/import]

It’s not just custom fonts; try ArialRoundedMTBold. This frustrating bug has been around a while because it’s not a show-stopper:
http://developer.anscamobile.com/forum/2010/06/15/huge-problem-font-positioning-between-simulator-and-device [import]uid: 12108 topic_id: 6285 reply_id: 21692[/import]

Thanks! I figured I couldn’t have been the first one to find this.

Carlos, can this be moved up on the bug list? Not a deal killer, but think of all the combined hours your subscribers are spending adjusting all their fonts’ positions via trial and error in successive builds!! Gotta be way more than how much time it would be to fix this. [import]uid: 9905 topic_id: 6285 reply_id: 21736[/import]

A year in and not fixed? I’m running into similar problems. Anyone have a good way of calculating how much offset fonts on device vs simulator? [import]uid: 88628 topic_id: 6285 reply_id: 85884[/import]

Having the same issue here :wink: +1

I suppose it has to do with the different line-height calculation in different devices, but it does not seem to work even when you try to center the text vertically with a Reference point in the center, so I suppose the problem is that the space below and above the font have different sizes… [import]uid: 13836 topic_id: 6285 reply_id: 123962[/import]

Having the same issue here :wink: +1

I suppose it has to do with the different line-height calculation in different devices, but it does not seem to work even when you try to center the text vertically with a Reference point in the center, so I suppose the problem is that the space below and above the font have different sizes… [import]uid: 13836 topic_id: 6285 reply_id: 123962[/import]