Created
February 2, 2019 20:52
-
-
Save Maxnelson997/bd4ccf3c1168cb4d91e5b5a5dbf239a8 to your computer and use it in GitHub Desktop.
Print all fonts from every font family included in your iOS swift app.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIFont.familyNames.forEach { (familyName) in | |
let fontNames = UIFont.fontNames(forFamilyName: familyName) | |
print(familyName, fontNames) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since this prints out a ton of fonts and you might just be looking for the names of a single font family, you can be more specific by targeting a keyword in the font family name like so.
In this example, I'm looking for Maven Pro font names.