Cant get custom fonts to work

Im trying to get custom fonts to work with android. 

This is my code

local optionsText = display.newText(“Options”, display.contentCenterX, 200, 200, 75, “NexaRustSlab-BlackShadow01”, 55)

In my projects root directory I have the file

NexaRustSlab-BlackShadow01.otf (Folder options set to allow ext. visibilty)

Is there another step I am missing?

Output prints > Warning: could not load font NexaRustSlab-BlackShadow01. using default font.

Hi @havochare4,

On occasion, a particular font can be corrupted, or the .otf version may have issues. Do you have a TrueType font that you can test with, just to see if that works?

Also, is the font extension lowercase, as in .otf and not.OTF?

Best regards,

Brent

http://jayscratchpad.wordpress.com/2014/06/16/corona-sdk-custom-font-issues/

Hi all,

The blog post link may have some incorrect details. For Android, it should be the font file name, minus the extension, not an “internal” font name gathered from some other software utility. For iOS/OSX, it’s different, and for the Windows Simulator, it’s yet again different.

Here is the Corona guide on using custom fonts:

http://docs.coronalabs.com/guide/system/customFont/index.html

Take care,

Brent

I think you were right about the otf being corrupted, as I tried with a ttf and was able to get it working just fine. Thanks for the help.

Hi @havochare4,

On occasion, a particular font can be corrupted, or the .otf version may have issues. Do you have a TrueType font that you can test with, just to see if that works?

Also, is the font extension lowercase, as in .otf and not.OTF?

Best regards,

Brent

http://jayscratchpad.wordpress.com/2014/06/16/corona-sdk-custom-font-issues/

Hi all,

The blog post link may have some incorrect details. For Android, it should be the font file name, minus the extension, not an “internal” font name gathered from some other software utility. For iOS/OSX, it’s different, and for the Windows Simulator, it’s yet again different.

Here is the Corona guide on using custom fonts:

http://docs.coronalabs.com/guide/system/customFont/index.html

Take care,

Brent

I think you were right about the otf being corrupted, as I tried with a ttf and was able to get it working just fine. Thanks for the help.