Last active
December 26, 2015 12:49
-
-
Save bananita/7154505 to your computer and use it in GitHub Desktop.
Snippet that shows all available fonts.
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
NSArray *fontFamilyNames = [UIFont familyNames]; | |
for (NSString *familyName in fontFamilyNames) | |
{ | |
NSLog(@"Font Family Name: %@", familyName); | |
NSArray *names = [UIFont fontNamesForFamilyName:familyName]; | |
NSLog(@"Font Names:\n %@", names); | |
} | |
//xamarin: | |
string[] fonts = UIFont.FamilyNames; | |
for (int i = 0; i < fonts.Length; i++) { | |
string[] names = UIFont.FontNamesForFamilyName(fonts[i]); | |
for (int j = 0; j < names.Length; j++) | |
Console.WriteLine (names [j]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment