添加 UIFont 并查找字体系列会因 EXC_BAD_ACCESS 崩溃
我的问题是,当我添加此处描述的字体时 当我想使用 [UIFont familyNames]
检索字体系列名称时,它会崩溃。我按照示例中描述的方式进行了操作,但对我来说它不起作用。
这是我的堆栈跟踪:
0x314b9ebe in CFDictionaryGetValue
0x33d79be4 in copy_localized_value
0x33d79bd4 in CGFontNameTableCopyRootName
0x33d796f2 in CGFontNameTableCreate
0x33d79e86 in CGFontCopyFamilyName
0x3414ca00 in AddFontsFromCGFontAndPath
0x3414cb7e in AddFontsFromURLOrPath
0x3414cc98 in Initialize
0x3414ce0a in GSFontCopyFamilyNames
0x323fce84 in +[UIFont familyNames]
...
我正在 iOS 3.2.2 上测试它,因为我不想升级我的 iPad,所以我无法判断它是否适用于其他 iOS 版本
我做错了什么?
My problem is, that when I add a font which is described here and when I want to retrieve the font family names with [UIFont familyNames]
it crashes. I did it the same way described in the example, but for me it doesn't work.
This is my stack trace:
0x314b9ebe in CFDictionaryGetValue
0x33d79be4 in copy_localized_value
0x33d79bd4 in CGFontNameTableCopyRootName
0x33d796f2 in CGFontNameTableCreate
0x33d79e86 in CGFontCopyFamilyName
0x3414ca00 in AddFontsFromCGFontAndPath
0x3414cb7e in AddFontsFromURLOrPath
0x3414cc98 in Initialize
0x3414ce0a in GSFontCopyFamilyNames
0x323fce84 in +[UIFont familyNames]
...
I'm testing it on iOS 3.2.2 and because i don't want my iPad to be upgraded, I can't tell if it works on other iOS Versions
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定您的字体文件有效且有效吗?
Are you sure your font file is valid and works?