Skip to content

Instantly share code, notes, and snippets.

@frederik-jacques
Created March 13, 2013 09:55
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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