Can't add custom font to Xcode

女生的网名这么多〃 提交于 2020-01-23 12:34:10

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/32545330/cant-add-custom-font-to-xcode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!