Created
July 17, 2014 13:51
-
-
Save Sumolari/26849693c69c28b80864 to your computer and use it in GitHub Desktop.
Lists available fonts with Swift
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
var fns = UIFont.familyNames() | |
for ( var iF = 0; iF < fns.count; ++iF ) { | |
println( "Family name: " + ( fns[ iF ] as String ) ) | |
var fontns = UIFont.fontNamesForFamilyName( ( fns[ iF ] as String ) ) | |
for ( var iFN = 0; iFN < fontns.count; ++iFN ) { | |
println( "\tFont name: " + ( fontns[ iFN ] as String ) ) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment