views:

564

answers:

1

Many thanks to @fabkk2002 who helped me adjust the Helvetica font on my iPhone to fully support Indic glyphs and rendering on my iPhone for an app I am creating. This leaves me with another problem. Now that I have adjusted the font on my phone, how will my users get the full support for the Indic font as well? I do not want to require them to jailbreak their phones and install the font to get the most out of the app because the iPhone doesn't ship with the proper font. I was thinking something along the lines of putting the font in the resource bundle of my app and have it copied to /System/Library/Fonts/Cache folder on the first launch, but I do not think this is possible with iPhone SDK. Will I have to use undocumented APIs and hope that Apple overlooks it when they are reviewing my app? Are there any good alternatives such as fooling my app into thinking the font in my resource bundle is located /System/Library/Fonts/Cache? What would be the best way to do this (with or without Undocumented APIs)?

EDIT: I was thinking something like this, except I doubt it will work.

NSString *fontPath = [[NSBundle mainBundle] pathForResource:@"Helvetica" ofType:@"ttf"];
[[NSFileManager defaultManager] copyItemAtPath:fontPath toPath:@"/System/Library/Fonts/Cache/"];
A: 

Custom fonts are actually supported without any hacks. Take a look at this code sample.

WardB
Code like this will not work with my project. While it does work with unicode characters, the Indic unicode characters I am using do not render properly because the code doesn't support TrueType or AAT tables. I feel that if I got something working like I suggested above, it would work.
Kulpreet