Last active
January 31, 2021 17:32
-
-
Save IvanovDeveloper/ddaf99ae28c481e3a211227a26b0d55a to your computer and use it in GitHub Desktop.
log all the fonts available to your app in the console
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
//Obhective-C | |
for (NSString* family in [UIFont familyNames]) | |
{ | |
NSLog(@"%@", family); | |
for (NSString* name in [UIFont fontNamesForFamilyName: family]) | |
{ | |
NSLog(@" %@", name); | |
} | |
} | |
//Swift | |
for family: String in UIFont.familyNames() | |
{ | |
print("\(family)") | |
for names: String in UIFont.fontNamesForFamilyName(family) | |
{ | |
print("== \(names)") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment