some font not showing in myapp from ios

对着背影说爱祢 提交于 2020-01-03 06:05:30

问题


  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.

    Font Lists are

  4. BellGothicStd-Light.ttf
  5. digiface.ttf
  6. rbno2-light-alternative.ttf

  7. EnhancedDotDigital-7.ttf

    • Working fonts are 4,5,6.
    • 7th font are not worked in my app

What is the reason for that?

  • Any not supporting font are in ios plateform. pls tell any solution for that.

回答1:


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

  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" size:17.0f];

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



来源:https://stackoverflow.com/questions/24605844/some-font-not-showing-in-myapp-from-ios

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