Problem with custom font?

Hey everyone,

I went through all the steps for using a custom font: I put the name of the file in the build.settings file, put the text file in my project folder, and the font even showed up in my terminal, when I did a print(v) of all the fonts. The custom font worked in the Corona Simulator. However, when I tested in the Xcode Simulator, the font does not show up. I have not tested on a device yet, but is this just a problem with Xcode? (I have been noticing lot of lag in Xcode compared to Corona Simulator as well).

Thanks for your help.

– Rahul
Mohan Games [import]uid: 175550 topic_id: 34598 reply_id: 334598[/import]

Can you post your build.settings file?

Also the font file name must match the embedded Font name and that must match (case signfiicant) what you’re using in the app.

Example:

myfontX2E.ttf – filename
My Font Regular – embedded font name

will fail because the font name and the embedded font name don’t match

My Font Regular – embedded font name
text = display.newText(“Some Text”, 0, 0, “my font regular”, 32)

will fail because the embedded font name and the name you used in Corona don’t match.

Android doesn’t like OTF files (though I thought a later build fixed that).
[import]uid: 199310 topic_id: 34598 reply_id: 137625[/import]

Can you post your build.settings file?

Also the font file name must match the embedded Font name and that must match (case signfiicant) what you’re using in the app.

Example:

myfontX2E.ttf – filename
My Font Regular – embedded font name

will fail because the font name and the embedded font name don’t match

My Font Regular – embedded font name
text = display.newText(“Some Text”, 0, 0, “my font regular”, 32)

will fail because the embedded font name and the name you used in Corona don’t match.

Android doesn’t like OTF files (though I thought a later build fixed that).
[import]uid: 199310 topic_id: 34598 reply_id: 137625[/import]