当前位置: 代码迷 >> Iphone >> 遍历iPhone上全部已经安装的字体
  详细解决方案

遍历iPhone上全部已经安装的字体

热度:109   发布时间:2016-04-25 06:36:29.0
遍历iPhone上所有已经安装的字体

NSArray *array = [UIFont familyNames];NSString *familyName ;NSMutableArray *fontNames = [[NSMutableArray alloc] init];for(familyName in array){    NSArray *names = [UIFont fontNamesForFamilyName:familyName];    [fontNames addObjectsFromArray:names];}NSLog(@"%@", fontNames);[fontNames release];
?

输出结果:

?

2011-10-30 14:25:11.901 Font[4695:b603] (    ArialHebrew,    "ArialHebrew-Bold",    Zapfino,    "OriyaSangamMN-Bold",    OriyaSangamMN,    "Cochin-BoldItalic",    Cochin,    "Cochin-Bold",    "Cochin-Italic",    Baskerville,    "Baskerville-Italic",    "Baskerville-BoldItalic",    "Baskerville-Bold",    "Palatino-Roman",    "Palatino-BoldItalic",    "Palatino-Italic",    "Palatino-Bold",    "ChalkboardSE-Bold",    "ChalkboardSE-Regular",    "GurmukhiMN-Bold",    GurmukhiMN,    Verdana,    "Verdana-Bold",    "Verdana-BoldItalic",    "Verdana-Italic",    "TamilSangamMN-Bold",    TamilSangamMN,    "MarkerFelt-Thin",    "MarkerFelt-Wide",    "CourierNewPS-BoldItalicMT",    "CourierNewPS-BoldMT",    "CourierNewPS-ItalicMT",    CourierNewPSMT,    "Courier-Bold",    Courier,    "Courier-BoldOblique",    "Courier-Oblique",    "TrebuchetMS-Italic",    "TrebuchetMS-Bold",    TrebuchetMS,    "Trebuchet-BoldItalic",    DBLCDTempBlack,    AppleColorEmoji,    ArialRoundedMTBold,    "BanglaSangamMN-Bold",    BanglaSangamMN,    TeluguSangamMN,    "TeluguSangamMN-Bold",    AmericanTypewriter,    "AmericanTypewriter-Bold",    "Arial-ItalicMT",    "Arial-BoldItalicMT",    ArialMT,    "Arial-BoldMT",    "Kailasa-Bold",    Kailasa,    AppleGothic,    "HiraKakuProN-W6",    "HiraKakuProN-W3",    "STHeitiSC-Medium",    "STHeitiSC-Light",    "MalayalamSangamMN-Bold",    MalayalamSangamMN,    "Thonburi-Bold",    Thonburi,    "Helvetica-BoldOblique",    Helvetica,    "Helvetica-Bold",    "Helvetica-Oblique",    "Noteworthy-Bold",    "Noteworthy-Light",    GujaratiSangamMN,    "GujaratiSangamMN-Bold",    "STHeitiK-Medium",    "STHeitiK-Light",    "Futura-MediumItalic",    "Futura-CondensedExtraBold",    "Futura-Medium",    "DevanagariSangamMN-Bold",    DevanagariSangamMN,    "STHeitiTC-Light",    "STHeitiTC-Medium",    "SinhalaSangamMN-Bold",    SinhalaSangamMN,    KannadaSangamMN,    "KannadaSangamMN-Bold",    "Georgia-BoldItalic",    Georgia,    "Georgia-Bold",    "Georgia-Italic",    "STHeitiJ-Medium",    "STHeitiJ-Light",    "TimesNewRomanPS-BoldItalicMT",    "TimesNewRomanPS-ItalicMT",    TimesNewRomanPSMT,    "TimesNewRomanPS-BoldMT",    SnellRoundhand,    "SnellRoundhand-Bold",    GeezaPro,    "GeezaPro-Bold",    "HelveticaNeue-Italic",    "HelveticaNeue-Bold",    "HelveticaNeue-BoldItalic",    HelveticaNeue)
  相关解决方案