views:

89

answers:

4

Dears, I 'm a novice in iphone programming. I am trying to make an iphone App that displays mainly Arabic language content. I want to use a custom arabic font for displaying that content, not the iphone default arabic font. I used the following code:

- (void)viewDidLoad {
    [super viewDidLoad];
    [arabicLabel setFont: [UIFont fontWithName: @"Simple Indust Shaded" size: 20]];
    arabicLabel.text = @"السلام عليكم";
}

where arabicLabel is an IBOutlet UILabel. I put the label in the App resources and add it to the info.plist file as UIAppFont array item. also the font is unicode.

When I run this code on the simulator, the label displayed the default arabic font (not my custom font); however it set its size to 20 as stated in the code!.

I don't understand what I did wrong here.. I know that in the info.plist I must add the font file name with extension (ttf) and I did that. Also I know that in the previous code I had to put the actual font name not file name, so i opened the file in my mac and used the title that appeared when the file is opened (Simple Indust Shaded).

Am I missing something? Are there any extra requirements for custom fonts other than being uicode?

Appreciate your help..

NB: I did the same procedure for custom English font and it worked!..

A: 

I have the same problem.... Anyone can help us?

YW

yw66
A: 

Hello, did you manage to resolve this. I too have this issue

Y

YS1
A: 

No, but I figured out this is not supported yet by Apple, so there is no hope for now.

ThursdayApp
A: 

You may try the following link which may be helpful Custom font loading complete example

Manu