标签: macos fonts customization core-text custom-font
我正在构建一个需要使用自定义字体的mac应用程序。使用CTFontManagerRegisterFontsForURL函数加载字体。每次应用程序开始运行时都会加载字体。
CTFontManagerRegisterFontsForURL
反正只是加载字体一次,只是以编程方式使用它?
答案 0 :(得分:1)
将kCTFontManagerScopeUser参数传递给CTFontManagerRegisterFontsForURL函数,将在后续会话中使用该字体。
kCTFontManagerScopeUser