ios 添加使用外部字体
2018-07-31 本文已影响0人
FM_0138
ios 开发时,会遇到特殊字体,下面是添加特殊字体的方法
1,下载需要用到的字体,一般是.ttf格式的
2,将.tff文件拖入到项目工程

3,在info.plist文件中,增加Fonts provided by application选项,后面跟着字体,可以直接写上字体名

4,字体使用
_label.font = [UIFont fontWithName:@"435-CAI978" size:14];
5,查看是否引入字体成功,断点打印,看结果是否包含字体
po [UIFont familyNames]