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?
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:
Import
yourfont.ttf
into your project (check the "copy items into destination group's folder" and "add to targets").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 theBamini.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.
this will work for sure.
来源:https://stackoverflow.com/questions/12633744/tamil-font-in-ios