How to install custom font in mac programmatically in macOS
问题 I am having a mac app in which I have custom font which is not there in my custom font book of application folder in my mac. So, when an app launches, I checked it that if a font is installed in mac or not with the below code. NSArray *fonts = [[NSFontManager sharedFontManager] availableFontFamilies]; if ([fonts containsObject:@"Square721 BT"]) { NSLog(@"Fonts Available"); } else { NSLog(@"No fonts"); } Now, if the font is not already installed, how can I install it programmatically? 回答1: Add