Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

Can't load custom font on Android
Started by tiago84 Mar 06 2018 09:09 AM

1 reply to this topic
android coronacards font
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Observer

  • 4 posts
  • Corona SDK

Hey there,


It seems that loading a font through CoronaCards on Android doesn't work. It works perfectly on the Corona Simulator.


Here's the log displayed  :I/System.out: WARNING: Could not load font assets/fonts/gulkave.ttf. Using default.


Here's the lua code :

local fontName = "assets/fonts/gulkave.ttf"
display.newText( message:upper(), screenW/2, screenH/2 + 20, fontName, defaultSize )

I have tried many fonts format and files : otf, ttf.


The folder is like this :

assets (android folder) -> coronagame -> *.lua (all the lua files, including the one loading the font), assets -> fonts -> gulkave.ttf


Please let me know if there's any specific behavior to change or if you have any idea on why it doesn't work.





[TOPIC: post.html]

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,409 posts
  • Enterprise

Android is a case-sensitive operating system. Are you sure the filename and the path to it are all lower case?

Also, please try leaving off the .ttf.