Adding a custom font to macOS app using Swift

前端 未结 5 2011
梦谈多话
梦谈多话 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:27

    THe value ATSApplicationFontsPath (i.e. Application fonts resource path) is relative to the Resources folder of your app bundle.

    To see where your fonts are copied to:

    1. In Xcode, expand the Products section under Project Navigator and click Show in Finder

    1. In Finder, Ctrl-click on your app and click Show Resource Contents. Browse to the Resources folder and find your fonts there.

提交回复
热议问题