简体   繁体   English

无法将自定义字体包含到xcode项目中

[英]Cannot include custom font into xcode project

i am trying to include a custom font into my project but i just cannot appear to do that. 我试图将自定义字体添加到我的项目中,但我似乎无法做到这一点。 I was able to do it in my pervious projects without a problem. 我能够在以前的项目中做到这一点而没有问题。

First of all, when i include a font in to xCode project it appears like this: 首先,当我在xCode项目中包含一种字体时,它看起来像这样: 在此处输入图片说明

I have tried alots of things, and I know the guidelines when adding a new font,I have read a lot of articles like this ( Common Mistakes With Adding Custom Fonts to Your iOS App ) and done that several times with success, but now it just wont work. 我已经尝试了很多事情,并且我知道添加新字体时的指导原则,我读了很多类似的文章( 将自定义字体添加到iOS应用程序中的常见错误 )并成功完成了几次,但是现在只是不会工作。

Fonts are included in the project, they are in copy bundle resources and in the .plist file. 字体包含在项目中,它们在副本捆绑软件资源和.plist文件中。

Also I have tried cleaning the project, deleting derivated data, I actually created the whole project from scratch, with no success... 我也尝试清理项目,删除派生数据,实际上我是从头开始创建整个项目的,没有成功...

xCode version is 6.4 Font in question is Roboto but i couldn't include any other. xCode版本是6.4,有问题的字体是Roboto,但我不能包含任何其他字体。 Font type is .ttf but i have tried with .otf also. 字体类型为.ttf,但我也尝试使用.otf。

Any help here? 这里有什么帮助吗?

Does your project name have any special characters in the name? 您的项目名称中是否有任何特殊字符? That can cause problems. 那会引起问题。 Eg question marks... 例如问号...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM