Custom fonts in Mac sdk using storyboard

前端 未结 1 1309
暖寄归人
暖寄归人 2021-01-07 08:15

How to add a custom font to storyboard in Mac app development. I went through some blogs and tried by adding font book and develop one NStextfield using this custom font usi

相关标签:
1条回答
  • 2021-01-07 08:52

    I spent a bit of time trying to figure this out and found the solution in this related question.

    In your info.plist file, which you made available to me at

    It turns out you can safely get rid of the "Fonts Provided By Application" section (it's an iOS specific key and is ignored by macOS).

    And for "Application Fonts resource path", make certain you have the font going into a "Fonts" folder (or some subfolder within your application bundle's Resources folder).

    Lastly, do a custom copy build phase like this:

    This is copying the font into the "Fonts" subfolder specified in your "Application Fonts resource path". You don't want the font in your Resources folder, but you do want it in a subfolder underneath Resources.

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