iOS 字体的可视化列表?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20125129/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 22:28:37  来源:igfitidea点击:

Visual List of iOS Fonts?

iosuifonttypeface

提问by user717452

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 is typed out in its typeface. I have seen one or two before, but the latest one I have seen was for iOS 5, and much more has been added since then.

我正在寻找适用于 iOS 7 的 iOS 字体列表。我在 Apple 的开发人员网站上找到了该列表,我只是想知道是否有人知道一个视觉列表,其中每个字体名称都以其字体输入。我之前看过一两个,但我看到的最新一个是针对 iOS 5 的,从那时起添加了更多。

采纳答案by CaptainRedmuff

Have you tried iOS Fonts?

你试过iOS 字体吗?

This gives you a visual of all of the available fonts with the ability to enter your own string of text to see how it would look.

这为您提供了所有可用字体的视觉效果,并能够输入您自己的文本字符串以查看其外观。

This doesn't appear to have been updated for iOS 7 however but I am unaware of any additional fonts which have been added since iOS 6.

这似乎没有针对 iOS 7 进行更新,但是我不知道自 iOS 6 以来添加了任何其他字体。

回答by Suragch

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

这个字体列表是用 Xcode 7 和 iOS 9 制作的。

enter image description here

在此处输入图片说明

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))
}

回答by Jens Schwarzer

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

(ObjC 中的原始答案)您可以在运行时获取列表:

// 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):

(添加:Swift 一个班轮):

UIFont.familyNames.forEach{ print(
Thonburi
  Thonburi-Bold
  Thonburi
  Thonburi-Light
Snell Roundhand
  SnellRoundhand-Black
  SnellRoundhand-Bold
  SnellRoundhand
  ...
); UIFont.fontNames(forFamilyName:
// Available fonts (console output)
for familyName in UIFont.familyNames() {
    print(familyName)
    for fontName in UIFont.fontNamesForFamilyName(familyName) {
        print(fontName)
    }
}
).forEach{ print(" ", ##代码##) } }

This will spit out:

这将吐出:

##代码##

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

我还制作了一个小应用程序,可用于浏览所有可用字体。检查它在这里

回答by Josh Brown

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

这是iOS 7字体的可视化列表。

回答by aspyct

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.
  1. 您可以在 Xcode 中列出标准字体。创建一个 xib(或故事板),添加一个标签并更改其字体。在那里你可以看到所有字体的列表。
  2. 在您的 OSX 计算机上,您有一个“字体簿”应用程序,您可以在其中查看每种字体。

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

还请记住,如果您正在构建应用程序,则不仅限于系统字体。你也可以提供你的。

回答by cnotethegr8

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.

查看iOS 字体列表。它是新的,并且比其他一些网站具有更多功能。它还包括其他网站甚至都没有提到的可下载字体。

回答by user3378170

Swift implementation:

斯威夫特实施:

##代码##