`

IOS7与IOS8系统字体相关

    博客分类:
  • IOS
 
阅读更多

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设备系统字体

    iOS设备系统到底有多少字体可以用,是很多开发者都迷惑的,本代码可以简单而实用的查看iOS设备系统自带的字体,还可以看到字体显示中英文的样子!

    ios-iOS 字体大全.zip

    项目利用到了 自己做了一个 需要的下载

Global site tag (gtag.js) - Google Analytics