Adding a custom font to macOS app using Swift

前端 未结 5 2004
梦谈多话
梦谈多话 2021-02-20 10:46

I followed a bunch of tutorials but it doesn’t work: I simply want to add a custom font to a macOS app.

What I tried essentially:

  1. Added the .
5条回答
  •  生来不讨喜
    2021-02-20 11:35

    None of the above worked for me in Xcode 12 beta 1 running BigSur but these steps did.

    1. Create a Fonts folder for organization.
    2. Add your fonts to the project. Be sure to check the macOS target!
    3. Set Application fonts resource path to "." (no quotes).

    No need to edit build phases or anything else.

提交回复
热议问题