Skip to content

Instantly share code, notes, and snippets.

@steverhall
Created May 8, 2019 18:21
Show Gist options
  • Save steverhall/50bc62a484fd678f5268805ae141a87e to your computer and use it in GitHub Desktop.
Save steverhall/50bc62a484fd678f5268805ae141a87e to your computer and use it in GitHub Desktop.
List fonts available for iOS
###
### FROM: https://blog.verslu.is/xamarin/xamarin-forms-xamarin/custom-fonts-with-xamarin-forms-revisited/
###
#if DEBUG
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));
}
};
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment