Objective-C - iOS5字体渲染已更改? [英] Objective-C – iOS5 font rendering has changed?

查看:116
本文介绍了Objective-C - iOS5字体渲染已更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在对单元格使用以下字体方法使用字体Myriad Pro时, iOS4(4.3模拟器)

In iOS4 (4.3 simulator) when I use the font Myriad Pro with the following font method for a cell:

cell.titleLabel.font = [UIFont fontWithName:@Myriad Prosize:14];

>

iOS5(5.0模拟器)中,当我使用相同字体方法的Myriad Pro字体时,它看起来像这样:

In iOS5 (5.0 simulator) when I use the font Myriad Pro with the same font method it looks like this:

>

有没有人经历过这种行为(也许与其他字体?)。

Has anyone experienced this behaviour as well (perhaps with other fonts?).

推荐答案

当使用 + fontWithName :size:在iOS 5中,字体名称参数需要是应用程序包中字体文件的全名,而不仅仅是字体系列名称。

When using +fontWithName:size: on iOS 5, the font name parameter needs to be the full name of the font file in your app bundle and not just the font family name.

这篇关于Objective-C - iOS5字体渲染已更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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