Custom font is not working in my App?

后端 未结 8 832
小蘑菇
小蘑菇 2020-12-06 22:23

In my iPhone app,

I have included two custom fonts and by referring this steps by stackoverflow questions....

How to include and use new fonts in iPhone SDK?

8条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-06 23:03

    You have passed a filename (glyphish.ttf) instead of the actual font name. Most likely, the font name is Glyphish, but you need to query it somehow: either using the Mac's "Font Book.app" or via code: first, you need to query the family names via [UIFont familyNames]. Then, use [UIFont fontNamesForFamilyName:] to get the actual font names to load. For example, if your font contains a bold variant its family name would be Glyphish but font name would likely be Glyphish-Bold.

提交回复
热议问题