Android Question Some ttf fonts don't work [SOLVED]

jnjft

Member
Licensed User
Hello everybody!
In my app the user can change the font of a text that is displayed (it's a reading exercise for pupils).
How is it that many ttf fonts work but some won't - they are either not recognized, so the default font is displayed, or they even cause the app to crash (although that happened only with one specific font so far).
Any suggestions?
Thank you!
 

jnjft

Member
Licensed User
Hi Erel, thanks for the reply.
.ttf-files are not in the list of accepted file types for uploading, so I've renamed them as .txt files. Don't know, if this works.

scriptbl.ttf works
sch690.ttf is not recognized - the default font is used (both in debug and in release mode)
mm.ttf is shown correctly in debug mode but crashes the app in release mode. I mean, after I've made a Release, the app crashes as soon as mm.ttf is loaded with Label.Typeface
 

Attachments

  • scriptbl.ttf.txt
    54.2 KB · Views: 172
  • sch690.ttf.txt
    42.1 KB · Views: 166
  • mm.ttf.txt
    13 KB · Views: 172
Upvote 0

Erel

Administrator
Staff member
Licensed User
I've added mm.ttf with the designer and it works properly here:

SS-2017-11-28_08.35.48.png


You should check the logs and post the error message. It might provide more information.
 
Upvote 0

jnjft

Member
Licensed User
Now this is a kind of magic - I came home today, compiled the app with the mm font in it, and it showed up nicely, no crash!
How did you do this? :)
May I ask you to try sch690.ttf - this doesn't display in debug nor in release mode on my machine. Does it show on your equipment?
Maybe you can tele-cure it like the mm font....

Thanks a lot for your help!
 
Upvote 0
Top