字体不能在XCode中加载 [英] Font not loading in XCode
问题描述
_myTextField.font = [UIFont fontWithName:@Adelle Basicsize:15];
Adelle Basic是我打开Font时的头文件。我也试过没有任何成功:
_myTextField.font = [UIFont fontWithName:@AdelleBasic_Boldsize:15];
有什么建议?
这可能不适用于所有的字体,但根据我的经验,Xcode可能很繁琐,我从来没有能够得到它使用otf字体(任何人请发表!),所以我总是转换我的字体使用这个非常优秀的网站 - 在线字体转换器
我将它们转换为ttf字体,它们似乎总是工作正常 - 确保您使用确切的名称(更改文件名字体似乎也停止它的工作)。
希望这有助于。
Well, I want to import a new Font to my application but without success. I have the Fonts provided by application key in my .plist , I have my font in the Item 0 as a String and the value AdelleBasic_Bold.otf, I have added that Font to my project, and I am trying to use it with:
_myTextField.font = [UIFont fontWithName:@"Adelle Basic" size:15];
Adelle Basic is the header of the Font when I open it. I have also tried without any success:
_myTextField.font = [UIFont fontWithName:@"AdelleBasic_Bold" size:15];
Any suggestion?
This may well not true for all fonts, but in my experience, Xcode can be fussy, & I've never been able to get it to use otf fonts (anyone who has please post!), so I've always converted my fonts using this really excellent website - Online Font Converter
I convert them to ttf fonts, and they always seem to work fine - make sure you use the exact name (changing the filename of the font seems to stop it working too).
Hope this helps.
这篇关于字体不能在XCode中加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!