字体行李箱到ttf问题

问题描述 投票:0回答:2

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

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

可能有人遇到这个问题?

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

iphone ios true-type-fonts uifont
2个回答
1
投票

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

非常简单,而且免费。它适用于macOS Mojave。

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


-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中。

© www.soinside.com 2019 - 2024. All rights reserved.