Skip to content

Instantly share code, notes, and snippets.

@dautermann
Last active April 10, 2019 05:36
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 dautermann/333564a125f1c71e2091 to your computer and use it in GitHub Desktop.
Save dautermann/333564a125f1c71e2091 to your computer and use it in GitHub Desktop.
Drop this thing into your iOS app to get the family name of custom fonts your using... or you could use MacOS Font Book. At least this way you know the custom font made it to the app on your simulator or device.
for family in UIFont.familyNames {
Swift.print("family is \(family)")
let specificFamilyName = family as String
for fontName in UIFont.fontNames(forFamilyName: specificFamilyName)
{
Swift.print("family name is \(fontName)")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment