Skip to content

Instantly share code, notes, and snippets.

@frederik-jacques
Created March 13, 2013 09:55
Show Gist options
  • Save frederik-jacques/5150676 to your computer and use it in GitHub Desktop.
Save frederik-jacques/5150676 to your computer and use it in GitHub Desktop.
Enumerate all fonts on your IOS device with this convenience method. Handy to find the name for your custom font!
- (void)enumerateFonts {
NSLog(@"--Start enumerating font--");
for (NSString *fontFamilyStrings in [UIFont familyNames]) {
NSLog(@"Font family: %@", fontFamilyStrings);
for (NSString *fontStrings in [UIFont fontNamesForFamilyName:fontFamilyStrings]) {
NSLog(@"-- Font: %@", fontStrings);
}
}
NSLog(@"--End enumerating font--");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment