字体行李箱到ttf问题

时间:2013-05-23 09:52:05

标签: iphone ios true-type-fonts uifont

我使用Mac OS Font Book从中导出字体。我有2个字体文件:Font Suitcase和PostScriptType。

然后我想在我的iOS应用程序中使用这些字体,但要做到这一点,我需要将它们转换为,例如,ttf。但是如何?

可能有人遇到这个问题吗?

重要: 我不需要建议如何使用自定义字体(如ttf),我需要建议如何使用Font Suitcase和PostScriptType字体(可能是如何将其转换为ttf)

2 个答案:

答案 0 :(得分:1)

此解决方案不需要Fondu或Rosetta,但确实需要对macOS的终端应用程序进行一些剪切和粘贴。

非常简单,而且免费。它可以在macOS Mojave上运行。

https://sittingduck.co.nz/2013/11/unpacking-the-suitcase/

答案 1 :(得分:-1)

尝试使用这些步骤。

1)    Add your custom font files into your project using Xcode as a resource
2)    Add a key to your Info.plist file called "Fonts provided by application".
3)    Make this key an array
4)    For each font you have, enter the full name of your font file (including the extension) as items to the UIAppFonts array
5)    Save Info.plist
6)    Now in your application you can simply call [UIFont fontWithName:@"CustomFontName" size:12] to get the custom font to use with your UILabels etc…

另外:确保字体位于Copy Bundle Resources中。

相关问题