我正在寻找iOS 7的iOS字体列表。我在Apple的开发者网站上找到了这个列表,我只是想知道是否有人知道一个可视列表,其中每个字体名称都是在其字体中输入的。我之前看过一两个,但我见过的最新版本是针对iOS 5的,从那时起又添加了更多。
答案 0 :(得分:66)
答案 1 :(得分:32)
此字体列表是使用Xcode 7和iOS 9制作的。
如果您以编程方式设置其中一个并需要字体名称,则可以执行以下操作:
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"]
如果您需要特定粗体/斜体/等样式的名称,您可以这样:
for familyName in UIFont.familyNames() {
print(UIFont.fontNamesForFamilyName(familyName))
}
答案 2 :(得分:21)
(ObjC中的原始答案)您可以在运行时获取列表:
// available fonts listed in xcode output
for (id familyName in [UIFont familyNames]) {
NSLog(@"%@", familyName);
for (id fontName in [UIFont fontNamesForFamilyName:familyName]) NSLog(@" %@", fontName);
}
(补充:Swift one liner):
UIFont.familyNames.forEach{ print($0); UIFont.fontNames(forFamilyName: $0).forEach{ print(" ", $0) } }
这将吐出:
Thonburi
Thonburi-Bold
Thonburi
Thonburi-Light
Snell Roundhand
SnellRoundhand-Black
SnellRoundhand-Bold
SnellRoundhand
...
我还制作了一个小应用程序,可用于浏览所有可用的字体。请查看here。
答案 3 :(得分:5)
以下是fonts in iOS 7的可视化列表。
答案 4 :(得分:3)
我不知道这样的工具,但有一种解决方法。
另外请记住,如果您正在构建应用程序,则不限于系统字体。你也可以提供。
答案 5 :(得分:1)
结帐iOS Font List。它是新的,并且还有一些其他网站的功能。它还包括可下载的字体,其他网站甚至都没有提到。
答案 6 :(得分:0)
快速实施:
// Available fonts (console output)
for familyName in UIFont.familyNames() {
print(familyName)
for fontName in UIFont.fontNamesForFamilyName(familyName) {
print(fontName)
}
}