Author Topic: How to check if a font supports a given symbol  (Read 1832 times)

kayy

  • Newbie
  • *
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 5
    • View Profile
How to check if a font supports a given symbol
« on: October 28, 2013, 12:42:11 PM »
In my Unity-iPhone project I get a formatted price from app store for my in-app purchases e.g. "1,79 €".

I use a font made with bmglyph and noticed that the euro sign is missing. I don't want to generate the font again because I finished all tests and I remember font generation was a bit tricky months ago. Instead I would like to check which parts of a string can be displayed and replace an unsupported currency sign by its code e.g. EUR.

Running the app in editor with my IAP simulation I get three subsequent question marks (cannot write it because it ends up as emoticon) within the label's text property the replacement works fine. On iOS this approach doesn't work, no question marks to check for. Is there any alternative method to check if a character is supported?

Thanks
Update:
I survived font creation including the currency symbols 0x02a0 to 0x02bf. The bigger font atlas seems to decrease performance on old iPhones not too hard. Thus the concrete problem is solved.
Anyway it could be interesting to have some bullet proof backup solution.
« Last Edit: October 28, 2013, 02:42:56 PM by kayy »