Skip to content
Browse files

mac gui: if CustomFontPath is missing add it.

  • Loading branch information...
1 parent 5175562 commit c7b8ddd57511d72b34951d34b8bde4dca80af3d4 @bradallred bradallred committed Jul 5, 2013
Showing with 7 additions and 0 deletions.
  1. +7 −0 apple/CocoaWrapper/mac/CocoaWrapper.mm
View
7 apple/CocoaWrapper/mac/CocoaWrapper.mm
@@ -103,6 +103,13 @@ - (void)applicationWillFinishLaunching:(NSNotification *) __unused aNotification
NSString* cachePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"gemrb"];
[defaults setValue:cachePath forKey:@"CachePath"];
}
+
+ NSMutableDictionary* additionalPaths = [defaults valueForKey:@"AdditionalPaths"];
+ if ([additionalPaths valueForKey:@"CustomFontPath"] == nil) {
+ NSArray* paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, NO);
+ NSString* fontPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"Fonts"];
+ [additionalPaths setValue:fontPath forKey:@"CustomFontPath"];
+ }
}
/* Called when the internal event loop has just started running */

0 comments on commit c7b8ddd

Please sign in to comment.
Something went wrong with that request. Please try again.