Question

I try to install Tamil font name Bamini.ttf in xcode 4.2 and I made the specific changes in info.plist.

Yet its not showing in Interface builder? Can any one help me to sort out this issue?

Was it helpful?

Solution

As far as I know new font that you've installed will never be listed in Interface builder.However you can use it in your project like this:

  1. Import yourfont.ttf into your project (check the "copy items into destination group's folder" and "add to targets").

  2. Open appname-info.plist a. add a new row and name it Fonts provided by application (It's an array of strings) b. add an entry with the Bamini.ttf

    Then try the following code

    UIFont *myFont = [UIFont fontWithName:@"Font name" size:18];
    [txtLabel setFont:myFont];
    

*Font name can be different form file name. You can check font name by opening that font. enter image description here

this will work for sure.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top