无法将自定义字体添加到Xcode [英] Can't add custom font to Xcode

查看:168
本文介绍了无法将自定义字体添加到Xcode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在Xcode中添加一个下载的字体,并且基于这个链接每一步都是这样的:

我把字体添加到我的Xcode项目,



并在字体P中输入(在Info.plist中)。





<然后我在GameScene.swift里面输入了这个名字didMoveToView



它和其他字体一起使用,但是不能和这个字体一起使用。这真是令人沮丧,我不知道是什么问题,谢谢。

解决方案

字体的名称是并不总是文件的名称。尝试查找文件,然后打开。它应该自动将其拉到字体书中,并且字体的名称位于顶部栏。只需输入,而不是文件名,它应该工作。

I'm trying to add a downloaded font to Xcode and I've folowed every single step based on this link: http://codewithchris.com/common-mistakes-with-adding-custom-fonts-to-your-ios-app/

I added the font to my Xcode Project,

included it in Copy Bundle Resources (Build Phases),

and typed it in Fonts Provided by Application (in Info.plist).

Then I typed this in GameScene.swift inside didMoveToView

It has worked with other fonts but not with this one. This is really frustrating me and I've got no idea what the problem is, thanks.

解决方案

The name of the font is not always the name of the file. Try looking for the file and then opening in. It should automatically pull it up in font book, and the name of the font is located on the top bar. Simply enter that instead of the file name and it should work.

这篇关于无法将自定义字体添加到Xcode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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