Skip to content

Instantly share code, notes, and snippets.

@jpavley
Last active January 5, 2023 22:47
Show Gist options
  • Save jpavley/6567674 to your computer and use it in GitHub Desktop.
Save jpavley/6567674 to your computer and use it in GitHub Desktop.
Iterate through all the fonts families and fonts in an iOS device and print their names to the console.
NSArray *fontFamilyNames = [UIFont familyNames];
for (NSString *familyName in fontFamilyNames) {
NSLog(@"Font Family Name = %@", familyName);
NSArray *names = [UIFont fontNamesForFamilyName:familyName];
NSLog(@"Font Names = %@", names);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment