Visual List of iOS Fonts?

后端 未结 7 1875
你的背包
你的背包 2020-12-23 09:14

I am looking for a list of iOS Fonts for iOS 7. I have found the list on Apple\'s developer site, I am just wondering if anyone knows of a visual list where each font name

相关标签:
7条回答
  • 2020-12-23 09:14

    Swift implementation:

    // Available fonts (console output)
    for familyName in UIFont.familyNames() {
        print(familyName)
        for fontName in UIFont.fontNamesForFamilyName(familyName) {
            print(fontName)
        }
    }
    
    0 讨论(0)
  • 2020-12-23 09:19

    Check out iOS Font List. It's new and has a few more features then some of the other sites. It also includes downloadable fonts which none of the other sites even mention.

    0 讨论(0)
  • 2020-12-23 09:20

    (Original answer in ObjC) You can get a list at run-time:

    // available fonts listed in xcode output
    for (id familyName in [UIFont familyNames]) {
        NSLog(@"%@", familyName);
        for (id fontName in [UIFont fontNamesForFamilyName:familyName]) NSLog(@"  %@", fontName);
    }
    

    (Added: Swift one liner):

    UIFont.familyNames.forEach{ print($0); UIFont.fontNames(forFamilyName: $0).forEach{ print("  ", $0) } }
    

    This will spit out:

    Thonburi
      Thonburi-Bold
      Thonburi
      Thonburi-Light
    Snell Roundhand
      SnellRoundhand-Black
      SnellRoundhand-Bold
      SnellRoundhand
      ...
    

    I have also made a small app that can be used to browse through all the available fonts. Check it out here.

    0 讨论(0)
  • 2020-12-23 09:23

    This font list was made with Xcode 7 and iOS 9.

    If you are setting one of these programmatically and need the font name, you can do the following:

    print(UIFont.familyNames)
    // ["Copperplate", "Heiti SC", "Iowan Old Style", "Kohinoor Telugu", "Thonburi", "Heiti TC", "Courier New", "Gill Sans", "Apple SD Gothic Neo", "Marker Felt", "Avenir Next Condensed", "Tamil Sangam MN", "Helvetica Neue", "Gurmukhi MN", "Times New Roman", "Georgia", "Apple Color Emoji", "Arial Rounded MT Bold", "Kailasa", "Kohinoor Devanagari", "Kohinoor Bangla", "Chalkboard SE", "Sinhala Sangam MN", "PingFang TC", "Gujarati Sangam MN", "Damascus", "Noteworthy", "Geeza Pro", "Avenir", "Academy Engraved LET", "Mishafi", "Futura", "Farah", "Kannada Sangam MN", "Arial Hebrew", "Arial", "Party LET", "Chalkduster", "Hoefler Text", "Optima", "Palatino", "Lao Sangam MN", "Malayalam Sangam MN", "Al Nile", "Bradley Hand", "PingFang HK", "Trebuchet MS", "Helvetica", "Courier", "Cochin", "Hiragino Mincho ProN", "Devanagari Sangam MN", "Oriya Sangam MN", "Snell Roundhand", "Zapf Dingbats", "Bodoni 72", "Verdana", "American Typewriter", "Avenir Next", "Baskerville", "Khmer Sangam MN", "Didot", "Savoye LET", "Bodoni Ornaments", "Symbol", "Menlo", "Bodoni 72 Smallcaps", "Papyrus", "Hiragino Sans", "PingFang SC", "Euphemia UCAS", "Telugu Sangam MN", "Bangla Sangam MN", "Zapfino", "Bodoni 72 Oldstyle"]
    

    And if you need the name of a particular bold/italic/etc style, you can get it like this:

    for familyName in UIFont.familyNames {
        print(UIFont.fontNames(forFamilyName: familyName))
    }
    
    0 讨论(0)
  • 2020-12-23 09:23

    I don't know of such a tool, but there's a workaround.

    1. You can list the standard fonts in Xcode. Create a xib (or storyboard), add a label and change its font. There you can see the list of all fonts.
    2. On your OSX computer, you have a "Font Book" application, where you can view each font.

    Also remember that you are not limited to the system fonts if you're building an application. You can provide yours as well.

    0 讨论(0)
  • 2020-12-23 09:26

    Here's a visual list of fonts in iOS 7.

    0 讨论(0)
提交回复
热议问题