Skip to content

Instantly share code, notes, and snippets.

@Tulakshana
Last active February 26, 2016 08:22
Show Gist options
  • Select an option

  • Save Tulakshana/e53a5028359d4f416a7d to your computer and use it in GitHub Desktop.

Select an option

Save Tulakshana/e53a5028359d4f416a7d to your computer and use it in GitHub Desktop.
A function to log all the fonts installed. This will list out the custom fonts included in the build as well. Address the fonts with the same name printed here when applying to UI components. Sometimes the font name is different from the file name.
- (void)printInstalledFonts;
- (void)printInstalledFonts{
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