Skip to content

Instantly share code, notes, and snippets.

@Sumolari
Created July 17, 2014 13:51
Show Gist options
  • Save Sumolari/26849693c69c28b80864 to your computer and use it in GitHub Desktop.
Save Sumolari/26849693c69c28b80864 to your computer and use it in GitHub Desktop.
Lists available fonts with Swift
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