Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Enumerating all the fonts in an iOS app
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
// Nifty helper to get all fonts with the right names in your console
var fontList = new StringBuilder();
var familyNames = UIFont.FamilyNames;
foreach (var familyName in familyNames)
fontList.Append(String.Format("Family: {0}\n", familyName));
Console.WriteLine("Family: {0}\n", familyName);
var fontNames = UIFont.FontNamesForFamilyName(familyName);
foreach (var fontName in fontNames)
Console.WriteLine("\tFont: {0}\n", fontName);
fontList.Append(String.Format("\tFont: {0}\n", fontName));
// ... Rest of the initialisation code here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment