Tamil font in iOS

旧城冷巷雨未停 提交于 2019-12-01 14:46:14

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.

this will work for sure.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!