Last active
September 20, 2017 01:48
-
-
Save skizzo/3d38bf1a2514ddb4fcd6b8ec551a41cb to your computer and use it in GitHub Desktop.
Determine & print installed fonts (iOS)
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
// Prints all installed/available fonts for iOS devices | |
for (NSString *familyName in [UIFont familyNames]){ | |
NSLog(@"Family name: %@", familyName); | |
for (NSString *fontName in [UIFont fontNamesForFamilyName:familyName]) { | |
NSLog(@"--Font name: %@", fontName); // <-- use fontName string for fontFamily style value | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment