添加 UIFont 并查找 fontfamily 崩溃与 EXC_BAD_ACCESS [英] Adding a UIFont and looking for the fontfamily crashes with EXC_BAD_ACCESS

查看:23
本文介绍了添加 UIFont 并查找 fontfamily 崩溃与 EXC_BAD_ACCESS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是,当我添加描述的字体时 这里 当我想用 [UIFont familyNames] 检索字体系列名称时,它会崩溃.我按照示例中描述的方式进行了操作,但对我来说它不起作用.

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.

这是我的堆栈跟踪:

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 版本

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

我做错了什么?

推荐答案

您确定您的字体文件有效且有效吗?

Are you sure your font file is valid and works?

这篇关于添加 UIFont 并查找 fontfamily 崩溃与 EXC_BAD_ACCESS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆