Custom font being clipped

I am having trouble with a custom font being clipped on certain letters. You can see this happening on the top of the “G”, the dot of the “i” and the base of the “g” in this picture - http://dl.dropbox.com/u/571145/fontProblem.png

Any one have any ideas for a possible solution? [import]uid: 5833 topic_id: 12600 reply_id: 312600[/import]

Are you trying to create a font with a larger size and then scale it? or is that with the simple custom font at 1:1? What font are you using, useful for replicating the process at your end.

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 12600 reply_id: 46625[/import]

It happens with the font at 1:1 on normal as well as when doubled and scaled back for retina.

The font is this one here - http://dl.dropbox.com/u/571145/Futura%20Maxi%20CG%20Bold.otf - maybe it’s because it’s OpenType?

Oh and, damn that was a fast response. I love the corona community :slight_smile: [import]uid: 5833 topic_id: 12600 reply_id: 46626[/import]

Hi Graham,
I *think* that OpenType is *not* the real issue here.

In the font the ascender and descender heights are set to indicate the spacing above the capheight and the space below the baseline. The font reads fine in the OS, but breaks on the Corona Simulator.
I tried compiling and putting it on the xCode simulator and the same issue, so it has something to do with the font rendering method used in the CoronaSDK.

I tried to get the contentHeight for the text, which should have been equal or more than the font size, but in this case it was lesser than the font size, that explains the clipping. Since we cannot set the sizes of text objects (as yet) you might want to report this as a Bug on the Corona Bug tracker page.

cheers,

?:slight_smile: [import]uid: 3826 topic_id: 12600 reply_id: 46634[/import]

Thanks Jay for helping, at least it’s not me doing something silly or going crazy :slight_smile: I have opened a case here - http://bugs.anscamobile.com/default.asp?7020 - hopefully it will get seen. [import]uid: 5833 topic_id: 12600 reply_id: 46635[/import]

I have the same problem. Very annoying. Not only are my fonts clipped but they are positioned differently on the device as compared to the simulator. Makes it pretty much impossible to use any fonts besides native.systemFont. [import]uid: 52127 topic_id: 12600 reply_id: 46676[/import]

Yea I have that issue two so I just slightly offset them when on device, annoying though as it’s time consuming to test. [import]uid: 5833 topic_id: 12600 reply_id: 46679[/import]

Just wanted to comment that I was having the exact same issue with ascenders being clipped with a custom OpenType font. I tried all sorts of different scenarios: manual retina fix, non-retina, widget library, etc. Same every time. It was happening in the simulator and the device, although the problem was slightly worse on the device.

In my case, I was able to find a TrueType version of the font online and using that solved the problem for me. Not sure why the OTF version didn’t work properly, but I guess I’d encourage you to try the TTF version of a font, or vice versa, if you’re having issues. [import]uid: 27119 topic_id: 12600 reply_id: 67888[/import]