Skip to content

Instantly share code, notes, and snippets.

@iamjason
Created September 12, 2014 16:13
Show Gist options
  • Save iamjason/ccb746658f626d225740 to your computer and use it in GitHub Desktop.
Save iamjason/ccb746658f626d225740 to your computer and use it in GitHub Desktop.
Prints out all of the Fonts available. (Helpful for using custom fonts)
for familyName in UIFont.familyNames() as [String] {
println("\(familyName)")
for fontName in UIFont.fontNamesForFamilyName(familyName) as [String] {
println("\tFont: \(fontName)")
}
}
@Aquima
Copy link

Aquima commented Feb 14, 2017

for familyName in UIFont.familyNames as [String] {

        print("\(familyName)")
        
        for fontName in UIFont.fontNames(forFamilyName: familyName) as [String] {
            print("\tFont: \(fontName)")
        }
        
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment