Search code examples
macosfontscustomizationcore-textcustom-font

load font permanently


I am building a mac application that needs to use an custom font. The font is loaded using CTFontManagerRegisterFontsForURL function. The font was loaded every time the application started running.

Is there anyway just to load the font once, and simply use it programmatically?


Solution

  • Pass the kCTFontManagerScopeUser parameter to CTFontManagerRegisterFontsForURL function, will make the font available in subsequent sessions.