外加字体

1.首先info.plist中加入属性Fonts provided by application,在item 0 处填写导入的ttf文件名

eg:

<key>UIAppFonts</key>

<array>

<string>方正兰亭纤黑简体.TTF</string>

<string>FZXQJW_0.TTF</string>

<string>CODE LIGHT.OTF</string>

<string>CODE BOLD.OTF</string>

<string>逐浪细阁体.otf</string>

</array>

然后在TAGECT中导入字体关联Compile Source

2.查出你导入字体的font name

NSArray * fontArrays = [[NSArray alloc] initWithArray:[UIFont familyNames]];
    for (NSString * temp in fontArrays) {
        NSLog(@"Font name  = %@", temp);
    }

3.就是这样简单的用了呗

UILabel * tempTwoLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 100, 300, 40)];
    UIFont * fontTwo = [UIFont fontWithName:@"DFPWaWaW5-GB" size:15];
    [tempTwoLabel setFont:fontTwo];
    [tempTwoLabel setText:@"这是新字体——ONe----->华康娃娃体"];
    [self.view addSubview:tempTwoLabel]

最新文章

  1. 【转】C# 中 10 个你真的应该学习(和使用!)的功能
  2. 【原创】Android ExpandableListView使用
  3. Gate level Simulation(门级仿真)
  4. StringUtils 的用法
  5. 基于HTML5的Drag and Drop生成图片Base64信息
  6. 【转】【C#】C#性能优化总结
  7. 【BZOJ】【2879】【NOI2012】美食节
  8. spring autoWire注解和@resource注解区别
  9. mycat读写分离
  10. java基础语法笔记
  11. windows server 2008见安装IIS方法(解决)
  12. 博客word测试
  13. php---数组序列化
  14. Hibernate中的实体映射
  15. css选择器语法速查
  16. 利用idea解决git代码冲突问题
  17. 数据库(mysql)基本使用命令大全
  18. 【原】The Linux Command Line - Redirection
  19. jQuery应用实例1:定时弹出图片
  20. mysql运行警告

热门文章

  1. Maven的具体使用和优点
  2. AOP注解方式ApsectJ开发
  3. bookdown - 撰写和发表自己的网络书籍/文档
  4. 转:【微信公众号】微信snsapi_base静默授权与snsapi_userinfo网页授权的实现(不建议使用静默,直接用主动比较方便)
  5. C# 获取文件扩展信息-应用名称/作者等
  6. 运维笔记--ubuntu安装指定版本的RabbitMQ
  7. App installation failed (A valid provisioning profile for this executable was not found)
  8. dotfuscator 在混淆.Net Framework 4.0以上版本的时候报错的解决方法2
  9. Python个人笔记
  10. IDEA 2018 搭建 Spring MVC helloworld