I'm trying to update my code so it will compile x86_64, unfortunately the code below is the main culprit (which happens to be roughly ten years old). I know it should be a CTFont type class, although I have no idea how to adapt this old code to the current. Any help would be appreciated. I've also included a reference to this code and some of its predecessors, which also happen to be deprecated. thanks!
- (void)loadLocalFonts
{
NSString *fontsFolder;
if ((fontsFolder = [[NSBundle mainBundle] resourcePath])) {
NSURL *fontsURL;
if ((fontsURL = [NSURL fileURLWithPath:fontsFolder])) {
FSRef fsRef;
FSSpec fsSpec;
(void)CFURLGetFSRef((CFURLRef)fontsURL, &fsRef);
if (FSGetCatalogInfo(&fsRef, kFSCatInfoNone, NULL, NULL, &fsSpec,
NULL) == noErr) {
FMActivateFonts(&fsSpec, NULL, NULL, kFMLocalActivationContext);
}
}
}
}