Skip to content

Instantly share code, notes, and snippets.

@martinbowling
Created March 19, 2013 16:19
Show Gist options
  • Save martinbowling/5197533 to your computer and use it in GitHub Desktop.
Save martinbowling/5197533 to your computer and use it in GitHub Desktop.
MonoTouch loop through fonts
String fonts = "--------------------------------------\n";
List<String> fontFamilies = new List<String> (UIFont.FamilyNames);
fontFamilies.Sort ();
foreach (String familyName in fontFamilies) {
foreach (String fontName in UIFont.FontNamesForFamilyName (familyName)) {
fonts += familyName;
fonts += "\t";
fonts += fontName;
fonts += "\n";
}
fonts += "--------------------------------------\n";
}
Console.WriteLine (fonts);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment