Created
October 14, 2013 23:08
-
-
Save b3ll/6983791 to your computer and use it in GitHub Desktop.
Don't look up inexistent fonts with CTFontCreateWithName
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSDate *date = [NSDate date]; | |
CTFontRef font = CTFontCreateWithName((__bridge CFStringRef)@"DOGE_NOT_APPROVE", 12, NULL); | |
NSDictionary *attributes = @{(__bridge id)kCTFontAttributeName: (__bridge_transfer id)font}; | |
NSAttributedString *string = [[NSAttributedString alloc] initWithString:@"broked" attributes:attributes]; | |
NSLog(@"%f %@", [date timeIntervalSinceNow], string); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment