一些字体没有显示在ios的myapp中 [英] some font not showing in myapp from ios

查看:187
本文介绍了一些字体没有显示在ios的myapp中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 我在myapp中使用了四种字体。

  2. 我在info.plist中添加了四个字体ttf文件。

  3. 我使用每种字体。但只有一种字体在我的应用中无效。

  1. There are Four font i using in myapp.
  2. i have adding four font ttf file in info.plist.
  3. i using each and every font. but only one font not working in my app.

字体列表

rbno2-light-alternative.ttf

rbno2-light-alternative.ttf

EnhancedDotDigital-7.ttf

EnhancedDotDigital-7.ttf


  • 工作字体为4,5,6。

  • 我的应用中没有使用第7种字体

什么是原因是什么?


  • 任何不支持的字体都在ios平台中。
    请告诉任何解决方案。

推荐答案

字体工作得很好。以下是我遵循的步骤:

The font is working just fine. Here are the steps I have followed to get it working:


  1. 下载字体并将其添加到我的项目中

  2. 确保将字体文件添加到正确的目标

  3. 字体在应用程序(info.plist)中提供的字体添加为 enhanced_dot_digital-7。 ttf (字体的文件名)

  4. 使用这样的字体

  1. Downloaded the font and added it into my project
  2. Make sure that the font file is added to the correct target
  3. Added the font in Fonts provided by application (info.plist) as enhanced_dot_digital-7.ttf (the filename of the font)
  4. Used the font like this

myLabel.font = [UIFont fontWithName:@EnhancedDotDigital-7尺寸:17.0f];

字体名称是字体的Postscript名称(它在链接的网站上列出。您也可以在Font Book应用程序中找到它)。所以我的猜测是你要么忘记将字体添加到目标中,要么在最后一步中使用不同的名称。我希望这是有道理的

Where the font name is the Postscript name of the font (it's listed on the linked website. You can also find out about this on Font Book app). So my guess is that you either forgot to add the font in to the target or used a different name in the last step. I hope that this makes sense

这篇关于一些字体没有显示在ios的myapp中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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