Author Topic: Missing character only on device?  (Read 1128 times)

rxmarcus

  • Newbie
  • *
  • Posts: 25
Missing character only on device?
« on: January 20, 2016, 08:48:30 PM »
In the editor on PC, all the characters in my font appear fine. On my android device however the ' character is replaced with a red X. I'm pretty sure that my Font Asset has this character in it, any idea why it is missing on the device but working in Editor?

Stephan B.

  • Administrator
  • Hero Member
  • *****
  • Posts: 5687
Re: Missing character only on device?
« Reply #1 on: January 21, 2016, 12:14:27 AM »
In the editor on PC, all the characters in my font appear fine. On my android device however the ' character is replaced with a red X. I'm pretty sure that my Font Asset has this character in it, any idea why it is missing on the device but working in Editor?

That is really strange as the target device doesn't have any bearing on the font asset in terms of its content.

Is it possible that the font asset isn't contained in a resources folder and then when the game is loaded on the device, since the font asset is missing, TMP ends up using whatever font asset is assigned in the TMP Setting file? Are you sure it is using the correct font on the device?

rxmarcus

  • Newbie
  • *
  • Posts: 25
Re: Missing character only on device?
« Reply #2 on: January 22, 2016, 05:34:51 PM »
I can't seem to reproduce this now, so good chance I made it up in my mind. I did find a few red X's in editor, but I generated a new SDF using the extended ASCII character set so hopefully that solves it all for me!

Stephan B.

  • Administrator
  • Hero Member
  • *****
  • Posts: 5687
Re: Missing character only on device?
« Reply #3 on: January 22, 2016, 06:02:05 PM »
I can't seem to reproduce this now, so good chance I made it up in my mind. I did find a few red X's in editor, but I generated a new SDF using the extended ASCII character set so hopefully that solves it all for me!

When the Red X shows up, there should be a debug warning (unless disabled in the TMP Settings file) letting you know what character is missing from the font asset. This way, you can make sure you include it when you re-create that font asset using one of the options like Custom Range, Unicode Range or Characters from File.

With regards to the Red X, this will also get easier with the next release as you will be able to define a list of Fallback fonts which will be used when a character is missing from the assigned font asset. So as long as the missing character is found in the Fallback fonts, the Red X won't show up again.