I know, if I want to use a font, that already exists in system, I can set it, for example, this way (1):
[[_someButton cell] setFont:[NSFont fontWithName:@"SomeAlreadyInstalledFontName" size:s]];
I also know, I can use a custom font from my project resources someway like that (2):
NSFont* someCustomFont = (NSFont*)[fontConverter fontFromBundle:@"SomeCustomFontName" withHeight:someHeight];
[[_someButton cell] setFont:someCustomFont(12)];
fontConverter is my class, that has a method with this signature:
- (CTFontRef) fontFromBundle : (NSString*) fontName withHeight : (CGFloat) height;
It works, however I want, instead of using method (2), install my custom font to system and work with it like (1).
So is it possible to do this: check, if custom font is installed in system, if no, then install it, when the application is launched/being installed?