I know you can customize fonts by using Interface Builder and selecting a font. However, I\'m curious if I can use a custom font that\'s not included by default on systems.
Here is the example for Mac App custom font loading.
NSString *fontFilePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"/fonts"];
fontsURL = [NSURL fileURLWithPath:fontFilePath];
if(fontsURL != nil)
{
OSStatus status;
FSRef fsRef;
CFURLGetFSRef((CFURLRef)fontsURL, &fsRef);
status = ATSFontActivateFromFileReference(&fsRef, kATSFontContextLocal, kATSFontFormatUnspecified,
NULL, kATSOptionFlagsDefault, NULL);
if (status != noErr)
{
errorMessage = @"Failed to acivate fonts!";
goto error;
}
}