iPhone中的非系统字体的名称 [英] Name of non-system font in iPhone

查看:112
本文介绍了iPhone中的非系统字体的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要为我的iPhone / iPad应用程式新增非系统字型。

I want to add a non-system font to my iPhone/iPad app.

我已将字体文件添加到项目中,并将字体添加到信息的 UIAppFonts 属性。 plist。

I have added the font file to the project and also added the font to the UIAppFonts property of the info.plist.

要加载字体我使用 fontWithName of UIFont 。但是字体的名称似乎不是带有或不带扩展名的文件名,也不是字体书中出现的名称。

To load the font I'm using fontWithName of UIFont. But the name of the font does not seem to be the file name, with or without extension, nor the name that appears in Font Book.

UIFont* font = [UIFont fontWithName:@"What goes here?" size:10];

我在哪里可以找到字体的名称 >

Where do I find out the name of the font?

推荐答案

UIFont + familyNames 然后 + fontNamesForFamilyName:应该做的。

这篇关于iPhone中的非系统字体的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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