UILabel的默认字体,我分别打印了出来,分别是
IOS7:font-family: ".HelveticaNeueInterface-M3"; font-weight: normal; font-style: normal; font-size: 17.00pt
IOS8:IOS8:font-family: ".HelveticaNeueInterface-Regular"; font-weight: normal; font-style: normal; font-size: 17.00pt
但是Helvetica Neue Interface却不在[UIFont familyNames]列表中,所以应该是某种方式的隐藏的字体。(结论参考:http://lists.apple.com/archives/cocoa-dev/2014/Jan/msg00213.html)
查看 UIFont preferredFontForTextStyle 返回值又有下面的隐藏字体:
IOS7:
prefered font[UIFontTextStyleCaption1]: <UICTFont: 0x14ee9fc0> font-family: ".HelveticaNeueInterface-M3"; font-weight: normal; font-style: normal; font-size: 12.00pt prefered font[UIFontTextStyleCaption2]: <UICTFont: 0x14eeb6d0> font-family: ".HelveticaNeueInterface-M3"; font-weight: normal; font-style: normal; font-size: 11.00pt prefered font[UIFontTextStyleBody]: <UICTFont: 0x14eee680> font-family: ".HelveticaNeueInterface-M3"; font-weight: normal; font-style: normal; font-size: 17.00pt prefered font[UIFontTextStyleFootnote]: <UICTFont: 0x14eeffb0> font-family: ".HelveticaNeueInterface-M3"; font-weight: normal; font-style: normal; font-size: 13.00pt prefered font[UIFontTextStyleHeadline]: <UICTFont: 0x14ef1f60> font-family: ".HelveticaNeueInterface-MediumP4"; font-weight: bold; font-style: normal; font-size: 17.00pt prefered font[UIFontTextStyleSubheadline]: <UICTFont: 0x14ef3f10> font-family: ".HelveticaNeueInterface-M3"; font-weight: normal; font-style: normal; font-size: 15.00pt
IOS8:
prefered font[UIFontTextStyleCaption1]: <UICTFont: 0x165ea690> font-family: ".HelveticaNeueInterface-Regular"; font-weight: normal; font-style: normal; font-size: 12.00pt prefered font[UIFontTextStyleCaption2]: <UICTFont: 0x1665f6c0> font-family: ".HelveticaNeueInterface-Regular"; font-weight: normal; font-style: normal; font-size: 11.00pt prefered font[UIFontTextStyleBody]: <UICTFont: 0x165eb2d0> font-family: ".HelveticaNeueInterface-Regular"; font-weight: normal; font-style: normal; font-size: 17.00pt prefered font[UIFontTextStyleFootnote]: <UICTFont: 0x165ecc80> font-family: ".HelveticaNeueInterface-Regular"; font-weight: normal; font-style: normal; font-size: 13.00pt prefered font[UIFontTextStyleHeadline]: <UICTFont: 0x166b0990> font-family: ".HelveticaNeueInterface-MediumP4"; font-weight: bold; font-style: normal; font-size: 17.00pt prefered font[UIFontTextStyleSubheadline]: <UICTFont: 0x165ee370> font-family: ".HelveticaNeueInterface-Regular"; font-weight: normal; font-style: normal; font-size: 15.00pt
很显然,UILabel的字体是[UIFont preferredFontForTextStyle:UIFontTextStyleBody]返回值
以下分别是IOS7、IOS8 的[UIFont familyNames]列表:
IOS7 familyNames: ( Thonburi, "Snell Roundhand", "Academy Engraved LET", "Marker Felt", Avenir, "Geeza Pro", "Arial Rounded MT Bold", "Trebuchet MS", Arial, Marion, Menlo, "Malayalam Sangam MN", "Kannada Sangam MN", "Gurmukhi MN", "Bodoni 72 Oldstyle", "Bradley Hand", Cochin, "Sinhala Sangam MN", "Hiragino Kaku Gothic ProN", "Iowan Old Style", Damascus, "Al Nile", Farah, Papyrus, Verdana, "Zapf Dingbats", "DIN Condensed", "Avenir Next Condensed", Courier, "Hoefler Text", "Euphemia UCAS", Helvetica, "Hiragino Mincho ProN", "Bodoni Ornaments", Superclarendon, Mishafi, Optima, "Gujarati Sangam MN", "Devanagari Sangam MN", "Apple Color Emoji", "Savoye LET", Kailasa, "Times New Roman", "Telugu Sangam MN", "Heiti SC", "Apple SD Gothic Neo", Futura, "Bodoni 72", Baskerville, Symbol, "Heiti TC", Copperplate, "Party LET", "American Typewriter", "Chalkboard SE", "Avenir Next", "Bangla Sangam MN", Noteworthy, Zapfino, "Tamil Sangam MN", Chalkduster, "Arial Hebrew", Georgia, "Helvetica Neue", "Gill Sans", Palatino, "Courier New", "Oriya Sangam MN", Didot, "DIN Alternate", "Bodoni 72 Smallcaps" )
IOS8 familyNames: ( Thonburi, "Khmer Sangam MN", "Snell Roundhand", "Academy Engraved LET", "Marker Felt", Avenir, "Geeza Pro", "Arial Rounded MT Bold", "Trebuchet MS", Arial, Marion, Menlo, "Malayalam Sangam MN", "Kannada Sangam MN", "Gurmukhi MN", "Bodoni 72 Oldstyle", "Bradley Hand", Cochin, "Sinhala Sangam MN", "Hiragino Kaku Gothic ProN", "Iowan Old Style", Damascus, "Al Nile", Farah, Papyrus, Verdana, "Zapf Dingbats", "DIN Condensed", "Avenir Next Condensed", Courier, "Hoefler Text", "Euphemia UCAS", Helvetica, "Lao Sangam MN", "Hiragino Mincho ProN", "Bodoni Ornaments", Superclarendon, Mishafi, Optima, "Gujarati Sangam MN", "Devanagari Sangam MN", "Apple Color Emoji", "Savoye LET", Kailasa, "Times New Roman", "Telugu Sangam MN", "Heiti SC", "Apple SD Gothic Neo", Futura, "Bodoni 72", Baskerville, Symbol, "Heiti TC", Copperplate, "Party LET", "American Typewriter", "Chalkboard SE", "Avenir Next", "Bangla Sangam MN", Noteworthy, Zapfino, "Tamil Sangam MN", Chalkduster, "Arial Hebrew", Georgia, "Helvetica Neue", "Gill Sans", "Kohinoor Devanagari", Palatino, "Courier New", "Oriya Sangam MN", Didot, "DIN Alternate", "Bodoni 72 Smallcaps" )
我使用在线文本比较工具比较了以下上述的分别,得出结论:
IOS8只是多出三种字体:Khmer Sangam MN、Lao Sangam MN、Kohinoor Devanagari
相关推荐
在iOS开发中,了解系统内置的字体对于UI设计和用户体验优化至关重要。本文将深入探讨如何查看iOS设备系统中的字体,并展示这些字体在显示中英文时的效果。我们将主要围绕以下几点展开: 1. iOS系统字体概述 2. 获取...
让我们深入探讨一下iOS字体的相关知识点。 首先,iOS系统自带多种字体,包括但不限于San Francisco(苹果公司的默认字体,分为Display和Text两种变体)、Helvetica Neue、Arial、Courier New等。San Francisco是...
但请注意,不是所有系统都支持iOS字体,且在某些平台上可能需要管理员权限才能安装。 总的来说,iOS8的细黑字体和超大EMOJI表情是苹果提升用户体验的重要举措,它们让文字和表情在小屏幕上更加清晰、生动,为用户...
总的来说,iOS字体的使用涉及到资源管理、配置文件修改以及代码中对字体的引用。开发者应根据应用的风格和需求选择合适的字体,同时注意遵守字体的使用规则,以提升应用的品质和用户体验。这个资源集合为开发者提供...