Created
May 8, 2019 18:21
-
-
Save steverhall/50bc62a484fd678f5268805ae141a87e to your computer and use it in GitHub Desktop.
List fonts available for iOS
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
### | |
### 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