Skip to content

Instantly share code, notes, and snippets.

@devmjun
Created August 7, 2019 07:22
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 devmjun/51a2fbb258f60927ce00cf8ed137448b to your computer and use it in GitHub Desktop.
Save devmjun/51a2fbb258f60927ce00cf8ed137448b to your computer and use it in GitHub Desktop.
print All Font list
for family in UIFont.familyNames {
let sName: String = family as String
print("family: \(sName)")
for name in UIFont.fontNames(forFamilyName: sName) {
print("name: \(name as String)")
let customFont = UIFont(name: name, size: 11)
print("font is nil?: \(customFont)")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment