0

I have been adding custom fonts to my project and know the usual checklist. But recently I tried to add the "Arial Unicode MS" font with filename ARIALUNI.TTF, but when I add the filename to my infoplist under "fonts provided by application" it crashes with a CFDictionaryRemoveValue.

I tried changing the .TTF to .ttf, checked the targets and build phases and everything is in order. On running the app, it does not even reach the appdelegate methods and crashes. For any other font that I try to add, it works perfectly fine.

Font Background: The ArialUni font is a paid font but have I have extracted it from adobe PS, even downloaded the font to be sure but to no avail. When I change the xcode font by changing it from the xcode preferences, it works fine. The font file is pretty huge at 23mb.

Can anyone point me in the right direction?

EDIT The debugger doesn't spew anything, the crash goes off if i delete the key from the "fonts provided by application" in the plist.

Stack trace

EDIT 2 Found this on SO. So the Arial Unicode MS belongs to the existing Arial font family. Does it mean i cant add new fonts to existing families?

Full stack

Community
  • 1
  • 1
B K
  • 1,554
  • 3
  • 19
  • 40
  • Edit your post to include the full stack trace of the crash and any messages that appear in the debugger console. – rob mayoff Dec 23 '12 at 04:44
  • You need to expand the stack trace using the slider at the bottom. Xcode has hidden frames 1-37. – rob mayoff Dec 23 '12 at 07:12
  • @robmayoff have expanded the stack, this is something very strange. Why does adding font affect the status bar text font. – B K Dec 24 '12 at 05:42
  • Laying out the status bar presumably happens early in the application's lifetime, and requires measuring the sizes of the items in the status bar. Some of those items (the carrier name and the time) are text, so measuring the sizes of those items requires loading the fonts used to draw those items. Perhaps the first time the app loads any font, it scans all of the fonts and caches information about them. The font loader doesn't like something about your font. – rob mayoff Dec 24 '12 at 19:44

1 Answers1

0

I raised a support ticket with Apple, they have confirmed that this font is not supported by iOS. Certain characters are not yet rendered on the iPhone so it crashes. It may be supported in the future but for now we cannot use this font.

B K
  • 1,554
  • 3
  • 19
  • 40