UIFont Woes (some custom fonts loading, but other's are not)

后端 未结 1 1895
轮回少年
轮回少年 2021-01-26 00:46

I\'m having an issue getting certain custom fonts to load. I followed the advice in the traditional, 400+ upvoted answer to this question, and it worked for one project perfect

1条回答
  •  鱼传尺愫
    2021-01-26 01:23

    The answer to this is that the font file name differs from the font name. If the file name is something like OpenSans-Regular, you sometimes only need to do the font name OpenSans when calling fontWithName:. This is why "OpenSans-Regular" did not work (as it was not the font name), whereas "OpenSans-Bold" did (since the name was the same as the file.)

    0 讨论(0)
提交回复
热议问题