Skip to content

Instantly share code, notes, and snippets.

@shahdhiren
Created January 20, 2017 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shahdhiren/d788b43e0cc17ca09a79344aade14576 to your computer and use it in GitHub Desktop.
Save shahdhiren/d788b43e0cc17ca09a79344aade14576 to your computer and use it in GitHub Desktop.
Print all fonts in iOS - Swift
func printFonts() {
let fontFamilyNames = UIFont.familyNames
for familyName in fontFamilyNames {
print("------------------------------")
print("Font Family Name = [\(familyName)]")
let names = UIFont.fontNames(forFamilyName: familyName )
print("Font Names = [\(names)]")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment