Skip to content
Browse files

Fixing the OTF importing

  • Loading branch information...
1 parent 0970408 commit f9148e4c6a3a916381a42f1ba4274380a7735259 @ELLIOTTCABLE committed
Showing with 1 addition and 5 deletions.
  1. +1 −5 YRSolcounter.m
View
6 YRSolcounter.m
@@ -38,11 +38,7 @@ -(id) initWithBundle: (NSBundle*)bundle {
inDirectory: @"Fonts"]];
// Core Foundation pain
- CGDataProviderRef cgDataProvider = CGDataProviderCreateWithURL((CFURLRef)fontURL);
- CGFontRef cgFont = CGFontCreateWithDataProvider(cgDataProvider);
- radixFont = CTFontCreateWithGraphicsFont(cgFont, 14.0, NULL, NULL);
- CFRelease(cgFont);
- CFRelease(cgDataProvider);
+ radixFont = (NSFont*)CTFontCreateWithFontDescriptor((CTFontDescriptorRef)[[(NSArray*)CTFontManagerCreateFontDescriptorsFromURL((CFURLRef)fontURL) autorelease] objectAtIndex:0], 18., NULL);
// end Core Foundation pain
NSLog(@"radixFont: %@", radixFont);

0 comments on commit f9148e4

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