Created
July 26, 2013 21:27
-
-
Save jimrutherford/6092371 to your computer and use it in GitHub Desktop.
Enumerate and list all fonts family names that are installed on a specific iOS device. Helpful to determine what font string name to use in [UIFont fontWithName:size:]
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
for (NSString *familyName in [UIFont familyNames]) { | |
for (NSString *fontName in [UIFont fontNamesForFamilyName:familyName]) { | |
NSLog(@"%@", fontName); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
for familyName in UIFont.familyNames() { for fontName in UIFont.fontNamesForFamilyName(familyName) { print("\(fontName)"); } }