美文网首页
iOS 字体名称获取方法

iOS 字体名称获取方法

作者: 七维树 | 来源:发表于2016-11-15 16:23 被阅读1073次

获取字体方法:

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

目前能列出部分已安装的字体名

 "Copperplate-Light",
    Copperplate,
    "Copperplate-Bold",
    "KohinoorTelugu-Regular",
    "KohinoorTelugu-Medium",
    "KohinoorTelugu-Light",
    Thonburi,
    "Thonburi-Bold",
    "Thonburi-Light",
    "CourierNewPS-BoldMT",
    "CourierNewPS-ItalicMT",
    CourierNewPSMT,
    "CourierNewPS-BoldItalicMT",
    "GillSans-Italic",
    "GillSans-Bold",
    "GillSans-BoldItalic",
    "GillSans-LightItalic",
    GillSans,
    "GillSans-Light",
    "GillSans-SemiBold",
    "GillSans-SemiBoldItalic",
    "GillSans-UltraBold",
    "AppleSDGothicNeo-Bold",
    "AppleSDGothicNeo-UltraLight",
    "AppleSDGothicNeo-Thin",
    "AppleSDGothicNeo-Regular",
    "AppleSDGothicNeo-Light",
    "AppleSDGothicNeo-Medium",
    "AppleSDGothicNeo-SemiBold",
    "MarkerFelt-Thin",
    "MarkerFelt-Wide",
    "AvenirNextCondensed-BoldItalic",
    "AvenirNextCondensed-Heavy",
    "AvenirNextCondensed-Medium",
    "AvenirNextCondensed-Regular",
    "AvenirNextCondensed-HeavyItalic",
    "AvenirNextCondensed-MediumItalic",
    "AvenirNextCondensed-Italic",
    "AvenirNextCondensed-UltraLightItalic",
    "AvenirNextCondensed-UltraLight",
    "AvenirNextCondensed-DemiBold",
    "AvenirNextCondensed-Bold",
    "AvenirNextCondensed-DemiBoldItalic",
    TamilSangamMN,
    "TamilSangamMN-Bold",
    "HelveticaNeue-Italic",
    "HelveticaNeue-Bold",
    "HelveticaNeue-UltraLight",
    "HelveticaNeue-CondensedBlack",
    "HelveticaNeue-BoldItalic",
    "HelveticaNeue-CondensedBold",
    "HelveticaNeue-Medium",
    "HelveticaNeue-Light",
    "HelveticaNeue-Thin",
    "HelveticaNeue-ThinItalic",
    "HelveticaNeue-LightItalic",
    "HelveticaNeue-UltraLightItalic",
    "HelveticaNeue-MediumItalic",
    HelveticaNeue,
    "GurmukhiMN-Bold",
    GurmukhiMN,
    TimesNewRomanPSMT,
    "TimesNewRomanPS-BoldItalicMT",
    "TimesNewRomanPS-ItalicMT",
    "TimesNewRomanPS-BoldMT",
    "Georgia-BoldItalic",
    Georgia,
    "Georgia-Italic",
    "Georgia-Bold",
    AppleColorEmoji,
    ArialRoundedMTBold,
    "Kailasa-Bold",
    Kailasa,
    "KohinoorDevanagari-Light",
    "KohinoorDevanagari-Regular",
    "KohinoorDevanagari-Semibold",
    "KohinoorBangla-Semibold",
    "KohinoorBangla-Regular",
    "KohinoorBangla-Light",
    "ChalkboardSE-Bold",
    "ChalkboardSE-Light",
    "ChalkboardSE-Regular",
    "SinhalaSangamMN-Bold",
    SinhalaSangamMN,
    "PingFangTC-Medium",
    "PingFangTC-Regular",
    "PingFangTC-Light",
    "PingFangTC-Ultralight",
    "PingFangTC-Semibold",
    "PingFangTC-Thin",
    "GujaratiSangamMN-Bold",
    GujaratiSangamMN,
    DamascusLight,
    DamascusBold,
    DamascusSemiBold,
    DamascusMedium,
    Damascus,
    "Noteworthy-Light",
    "Noteworthy-Bold",
    GeezaPro,
    "GeezaPro-Bold",
    "Avenir-Medium",
    "Avenir-HeavyOblique",
    "Avenir-Book",
    "Avenir-Light",
    "Avenir-Roman",
    "Avenir-BookOblique",
    "Avenir-MediumOblique",
    "Avenir-Black",
    "Avenir-BlackOblique",
    "Avenir-Heavy",
    "Avenir-LightOblique",
    "Avenir-Oblique",
    AcademyEngravedLetPlain,
    DiwanMishafi,
    "Futura-CondensedMedium",
    "Futura-CondensedExtraBold",
    "Futura-Medium",
    "Futura-MediumItalic",
    "Futura-Bold",
    Farah,
    KannadaSangamMN,
    "KannadaSangamMN-Bold",
    "ArialHebrew-Bold",
    "ArialHebrew-Light",
    ArialHebrew,
    ArialMT,
    "Arial-BoldItalicMT",
    "Arial-BoldMT",
    "Arial-ItalicMT",
    PartyLetPlain,
    Chalkduster,
    "HoeflerText-Italic",
    "HoeflerText-Regular",
    "HoeflerText-Black",
    "HoeflerText-BlackItalic",
    "Optima-Regular",
    "Optima-ExtraBlack",
    "Optima-BoldItalic",
    "Optima-Italic",
    "Optima-Bold",
    "Palatino-Bold",
    "Palatino-Roman",
    "Palatino-BoldItalic",
    "Palatino-Italic",
    LaoSangamMN,
    "MalayalamSangamMN-Bold",
    MalayalamSangamMN,
    "AlNile-Bold",
    AlNile,
    "BradleyHandITCTT-Bold",
    "PingFangHK-Ultralight",
    "PingFangHK-Semibold",
    "PingFangHK-Thin",
    "PingFangHK-Light",
    "PingFangHK-Regular",
    "PingFangHK-Medium",
    "Trebuchet-BoldItalic",
    TrebuchetMS,
    "TrebuchetMS-Bold",
    "TrebuchetMS-Italic",
    "Helvetica-Bold",
    Helvetica,
    "Helvetica-LightOblique",
    "Helvetica-Oblique",
    "Helvetica-BoldOblique",
    "Helvetica-Light",
    "Courier-BoldOblique",
    Courier,
    "Courier-Bold",
    "Courier-Oblique",
    "Cochin-Bold",
    Cochin,
    "Cochin-Italic",
    "Cochin-BoldItalic",
    "HiraMinProN-W6",
    "HiraMinProN-W3",
    DevanagariSangamMN,
    "DevanagariSangamMN-Bold",
    OriyaSangamMN,
    "OriyaSangamMN-Bold",
    "SnellRoundhand-Bold",
    SnellRoundhand,
    "SnellRoundhand-Black",
    ZapfDingbatsITC,
    "BodoniSvtyTwoITCTT-Bold",
    "BodoniSvtyTwoITCTT-Book",
    "BodoniSvtyTwoITCTT-BookIta",
    "Verdana-Italic",
    "Verdana-BoldItalic",
    Verdana,
    "Verdana-Bold",
    "AmericanTypewriter-CondensedLight",
    AmericanTypewriter,
    "AmericanTypewriter-CondensedBold",
    "AmericanTypewriter-Light",
    "AmericanTypewriter-Semibold",
    "AmericanTypewriter-Bold",
    "AmericanTypewriter-Condensed",
    "AvenirNext-UltraLight",
    "AvenirNext-UltraLightItalic",
    "AvenirNext-Bold",
    "AvenirNext-BoldItalic",
    "AvenirNext-DemiBold",
    "AvenirNext-DemiBoldItalic",
    "AvenirNext-Medium",
    "AvenirNext-HeavyItalic",
    "AvenirNext-Heavy",
    "AvenirNext-Italic",
    "AvenirNext-Regular",
    "AvenirNext-MediumItalic",
    "Baskerville-Italic",
    "Baskerville-SemiBold",
    "Baskerville-BoldItalic",
    "Baskerville-SemiBoldItalic",
    "Baskerville-Bold",
    Baskerville,
    KhmerSangamMN,
    "Didot-Italic",
    "Didot-Bold",
    Didot,
    SavoyeLetPlain,
    BodoniOrnamentsITCTT,
    Symbol,
    "Menlo-Italic",
    "Menlo-Bold",
    "Menlo-Regular",
    "Menlo-BoldItalic",
    "BodoniSvtyTwoSCITCTT-Book",
    Papyrus,
    "Papyrus-Condensed",
    "HiraginoSans-W3",
    "HiraginoSans-W6",
    "PingFangSC-Ultralight",
    "PingFangSC-Regular",
    "PingFangSC-Semibold",
    "PingFangSC-Thin",
    "PingFangSC-Light",
    "PingFangSC-Medium",
    "MyanmarSangamMN-Bold",
    MyanmarSangamMN,
    "EuphemiaUCAS-Italic",
    EuphemiaUCAS,
    "EuphemiaUCAS-Bold",
    Zapfino,
    "BodoniSvtyTwoOSITCTT-Book",
    "BodoniSvtyTwoOSITCTT-Bold",
    "BodoniSvtyTwoOSITCTT-BookIt"

相关文章

网友评论

      本文标题:iOS 字体名称获取方法

      本文链接:https://www.haomeiwen.com/subject/lrclpttx.html