【问题标题】:Must one add custom font file to info.plist in Xcode?必须将自定义字体文件添加到 Xcode 中的 info.plist 吗?
【发布时间】:2015-11-17 18:08:58
【问题描述】:

关于在 Xcode 中添加自定义字体的问题。在我将它作为 ttf 文件添加到我的项目资源后,我可以在我的故事板的标签中使用它。但是我是否也需要将其添加到 info.plist 文件中?

【问题讨论】:

    标签: ios uifont


    【解决方案1】:

    是的,您必须将自定义字体添加到您的 Info.plist。您可以使用 UIAppFont Info.plist 键(在 plist 编辑器中显示为 Fonts provided by application)来执行此操作。

    这里是relevant documentation

    还有一个例子:

    <key>UIAppFonts</key>
    <array>
        <string>SomeFont.otf</string>
        <string>SomeOtherFont.otf</string>
    </array>
    

    【讨论】:

      猜你喜欢
      • 2021-09-04
      • 2015-08-13
      • 2011-11-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-21
      • 1970-01-01
      • 2016-08-11
      相关资源
      最近更新 更多