gpt4 book ai didi

ios - iOS SDK 是否支持 SVG 作为自定义字体?

转载 作者:行者123 更新时间:2023-11-29 03:04:44 24 4
gpt4 key购买 nike

我在 SVG 文件中有一个自定义字体。我已经将它添加到应用程序的包中,就像我使用 OTF 字体一样。现在我尝试在下面的代码中使用它:

UIFont * customFont = [UIFont fontWithName:@"myFont" size:16.0f];

我收到错误:

Apr 7 14:58:46 Alexander ExampleProject[26403] : FT_Open_Face failed: error 2.

我认为 iOS SDK 还不支持 SVG 字体,因为同样的方式适用于 OTF 字体,但不适用于 SVG。我说得对吗?

最佳答案

iOS SDK 不支持将 SVG 作为字体。

但是你可以只转换字体,例如 http://www.freefontconverter.com/

关于ios - iOS SDK 是否支持 SVG 作为自定义字体?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22910511/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com