Skip to content

Instantly share code, notes, and snippets.

@jjgod
Created July 26, 2008 12:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjgod/2639 to your computer and use it in GitHub Desktop.
Save jjgod/2639 to your computer and use it in GitHub Desktop.
NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
NSLog(@"documentsDirectory: %@", resourcePath);
NSString *fontPath = [NSString stringWithFormat: @"%@/MinionPro-Regular.otf", resourcePath];
NSURL *fontURL = [NSURL fileURLWithPath: fontPath isDirectory: NO];
fontProvider = CGDataProviderCreateWithURL((CFURLRef) fontURL);
NSLog(@"%@, fontProvider = %p", fontURL, fontProvider);
mainFont = CGFontCreateWithDataProvider(fontProvider);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment