Object-C 获取系统字体和字体名字

ChatGPT 3.5 国内中文镜像站免费使用啦

零基础 Object-C 学习路线推荐 : Object-C 学习目录 >> Object-C 基础

零基础 Object-C 学习路线推荐 : Object-C 学习目录 >> Object-C 线程

零基础 Object-C 学习路线推荐 : Object-C 学习目录 >> OpenGL ES

零基础 Object-C 学习路线推荐 : Object-C 学习目录 >> GPUImage

零基础 Object-C 学习路线推荐 : Object-C 学习目录 >> AVFoundation

零基础 Object-C 学习路线推荐 : Object-C 学习目录 >> CocoaPods


一.获取系统字体和字体名字

/******************************************************************************************/
//@Author:猿说编程
//@Blog(个人博客地址): www.codersrc.com
//@File:Object-C 获取系统字体和字体名字
//@Time:2021/08/07 08:00
//@Motto:不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
/******************************************************************************************/


for(NSString *fontfamilyname in [UIFont familyNames])
{
    NSLog(@"family:'%@'",fontfamilyname);
    for(NSString *fontName in [UIFont fontNamesForFamilyName:fontfamilyname])
    {
        NSLog(@"\tfont:'%@'",fontName);
    }
    NSLog(@"-------------");
}

/*
输出:
[1535:63699] family:'Academy Engraved LET'
[1535:63699]     font:'AcademyEngravedLetPlain'
[1535:63699] -------------
[1535:63699] family:'Al Nile'
[1535:63699]     font:'AlNile'
[1535:63699]     font:'AlNile-Bold'
[1535:63699] -------------
[1535:63699] family:'American Typewriter'
[1535:63699]     font:'AmericanTypewriter'
[1535:63699]     font:'AmericanTypewriter-Light'
[1535:63699]     font:'AmericanTypewriter-Semibold'
[1535:63699]     font:'AmericanTypewriter-Bold'
[1535:63699]     font:'AmericanTypewriter-Condensed'
[1535:63699]     font:'AmericanTypewriter-CondensedLight'
[1535:63699]     font:'AmericanTypewriter-CondensedBold'
[1535:63699] -------------
[1535:63699] family:'Apple Color Emoji'
[1535:63699]     font:'AppleColorEmoji'
[1535:63699] -------------
[1535:63699] family:'Apple SD Gothic Neo'
[1535:63699]     font:'AppleSDGothicNeo-Regular'
[1535:63699]     font:'AppleSDGothicNeo-Thin'
[1535:63699]     font:'AppleSDGothicNeo-UltraLight'
[1535:63699]     font:'AppleSDGothicNeo-Light'
[1535:63699]     font:'AppleSDGothicNeo-Medium'
[1535:63699]     font:'AppleSDGothicNeo-SemiBold'
[1535:63699]     font:'AppleSDGothicNeo-Bold'
[1535:63699] -------------
[1535:63699] family:'Apple Symbols'
[1535:63699]     font:'AppleSymbols'
[1535:63699] -------------
[1535:63699] family:'Arial'
[1535:63699]     font:'ArialMT'
[1535:63699]     font:'Arial-ItalicMT'
[1535:63699]     font:'Arial-BoldMT'
[1535:63699]     font:'Arial-BoldItalicMT'
[1535:63699] -------------
[1535:63699] family:'Arial Hebrew'
[1535:63699]     font:'ArialHebrew'
[1535:63699]     font:'ArialHebrew-Light'
[1535:63699]     font:'ArialHebrew-Bold'
[1535:63699] -------------
[1535:63699] family:'Arial Rounded MT Bold'
[1535:63699]     font:'ArialRoundedMTBold'
[1535:63699] -------------
[1535:63699] family:'Avenir'
[1535:63699]     font:'Avenir-Book'
[1535:63699]     font:'Avenir-Roman'
[1535:63699]     font:'Avenir-BookOblique'
[1535:63699]     font:'Avenir-Oblique'
[1535:63699]     font:'Avenir-Light'
[1535:63699]     font:'Avenir-LightOblique'
[1535:63699]     font:'Avenir-Medium'
[1535:63699]     font:'Avenir-MediumOblique'
[1535:63699]     font:'Avenir-Heavy'
[1535:63699]     font:'Avenir-HeavyOblique'
[1535:63699]     font:'Avenir-Black'
[1535:63699]     font:'Avenir-BlackOblique'
[1535:63699] -------------
[1535:63699] family:'Avenir Next'
[1535:63699]     font:'AvenirNext-Regular'
[1535:63699]     font:'AvenirNext-Italic'
[1535:63699]     font:'AvenirNext-UltraLight'
[1535:63699]     font:'AvenirNext-UltraLightItalic'
[1535:63699]     font:'AvenirNext-Medium'
[1535:63699]     font:'AvenirNext-MediumItalic'
[1535:63699]     font:'AvenirNext-DemiBold'
[1535:63699]     font:'AvenirNext-DemiBoldItalic'
[1535:63699]     font:'AvenirNext-Bold'
[1535:63699]     font:'AvenirNext-BoldItalic'
[1535:63699]     font:'AvenirNext-Heavy'
[1535:63699]     font:'AvenirNext-HeavyItalic'
[1535:63699] -------------
[1535:63699] family:'Avenir Next Condensed'
[1535:63699]     font:'AvenirNextCondensed-Regular'
[1535:63699]     font:'AvenirNextCondensed-Italic'
[1535:63699]     font:'AvenirNextCondensed-UltraLight'
[1535:63699]     font:'AvenirNextCondensed-UltraLightItalic'
[1535:63699]     font:'AvenirNextCondensed-Medium'
[1535:63699]     font:'AvenirNextCondensed-MediumItalic'
[1535:63699]     font:'AvenirNextCondensed-DemiBold'
[1535:63699]     font:'AvenirNextCondensed-DemiBoldItalic'
[1535:63699]     font:'AvenirNextCondensed-Bold'
[1535:63699]     font:'AvenirNextCondensed-BoldItalic'
[1535:63699]     font:'AvenirNextCondensed-Heavy'
[1535:63699]     font:'AvenirNextCondensed-HeavyItalic'
[1535:63699] -------------
[1535:63699] family:'Baskerville'
[1535:63699]     font:'Baskerville'
[1535:63699]     font:'Baskerville-Italic'
[1535:63699]     font:'Baskerville-SemiBold'
[1535:63699]     font:'Baskerville-SemiBoldItalic'
[1535:63699]     font:'Baskerville-Bold'
[1535:63699]     font:'Baskerville-BoldItalic'
[1535:63699] -------------
[1535:63699] family:'Bodoni 72'
[1535:63699]     font:'BodoniSvtyTwoITCTT-Book'
[1535:63699]     font:'BodoniSvtyTwoITCTT-BookIta'
[1535:63699]     font:'BodoniSvtyTwoITCTT-Bold'
[1535:63699] -------------
[1535:63699] family:'Bodoni 72 Oldstyle'
[1535:63699]     font:'BodoniSvtyTwoOSITCTT-Book'
[1535:63699]     font:'BodoniSvtyTwoOSITCTT-BookIt'
[1535:63699]     font:'BodoniSvtyTwoOSITCTT-Bold'
[1535:63699] -------------
[1535:63699] family:'Bodoni 72 Smallcaps'
[1535:63699]     font:'BodoniSvtyTwoSCITCTT-Book'
[1535:63699] -------------
[1535:63699] family:'Bodoni Ornaments'
[1535:63699]     font:'BodoniOrnamentsITCTT'
[1535:63699] -------------
[1535:63699] family:'Bradley Hand'
[1535:63699]     font:'BradleyHandITCTT-Bold'
[1535:63699] -------------
[1535:63699] family:'Chalkboard SE'
[1535:63699]     font:'ChalkboardSE-Regular'
[1535:63699]     font:'ChalkboardSE-Light'
[1535:63699]     font:'ChalkboardSE-Bold'
[1535:63699] -------------
[1535:63699] family:'Chalkduster'
[1535:63699]     font:'Chalkduster'
[1535:63699] -------------
[1535:63699] family:'Charter'
[1535:63699]     font:'Charter-Roman'
[1535:63699]     font:'Charter-Italic'
[1535:63699]     font:'Charter-Bold'
[1535:63699]     font:'Charter-BoldItalic'
[1535:63699]     font:'Charter-Black'
[1535:63699]     font:'Charter-BlackItalic'
[1535:63699] -------------
[1535:63699] family:'Cochin'
[1535:63699]     font:'Cochin'
[1535:63699]     font:'Cochin-Italic'
[1535:63699]     font:'Cochin-Bold'
[1535:63699]     font:'Cochin-BoldItalic'
[1535:63699] -------------
[1535:63699] family:'Copperplate'
[1535:63699]     font:'Copperplate'
[1535:63699]     font:'Copperplate-Light'
[1535:63699]     font:'Copperplate-Bold'
[1535:63699] -------------
[1535:63699] family:'Courier'
[1535:63699]     font:'Courier'
[1535:63699]     font:'Courier-Oblique'
[1535:63699]     font:'Courier-Bold'
[1535:63699]     font:'Courier-BoldOblique'
[1535:63699] -------------
[1535:63699] family:'Courier New'
[1535:63699]     font:'CourierNewPSMT'
[1535:63699]     font:'CourierNewPS-ItalicMT'
[1535:63699]     font:'CourierNewPS-BoldMT'
[1535:63699]     font:'CourierNewPS-BoldItalicMT'
[1535:63699] -------------
[1535:63699] family:'Damascus'
[1535:63699]     font:'Damascus'
[1535:63699]     font:'DamascusLight'
[1535:63699]     font:'DamascusMedium'
[1535:63699]     font:'DamascusSemiBold'
[1535:63699]     font:'DamascusBold'
[1535:63699] -------------
[1535:63699] family:'Devanagari Sangam MN'
[1535:63699]     font:'DevanagariSangamMN'
[1535:63699]     font:'DevanagariSangamMN-Bold'
[1535:63699] -------------
[1535:63699] family:'Didot'
[1535:63699]     font:'Didot'
[1535:63699]     font:'Didot-Italic'
[1535:63699]     font:'Didot-Bold'
[1535:63699] -------------
[1535:63699] family:'DIN Alternate'
[1535:63699]     font:'DINAlternate-Bold'
[1535:63699] -------------
[1535:63699] family:'DIN Condensed'
[1535:63699]     font:'DINCondensed-Bold'
[1535:63699] -------------
[1535:63699] family:'Euphemia UCAS'
[1535:63699]     font:'EuphemiaUCAS'
[1535:63699]     font:'EuphemiaUCAS-Italic'
[1535:63699]     font:'EuphemiaUCAS-Bold'
[1535:63699] -------------
[1535:63699] family:'Farah'
[1535:63699]     font:'Farah'
[1535:63699] -------------
[1535:63699] family:'Futura'
[1535:63699]     font:'Futura-Medium'
[1535:63699]     font:'Futura-MediumItalic'
[1535:63699]     font:'Futura-Bold'
[1535:63699]     font:'Futura-CondensedMedium'
[1535:63699]     font:'Futura-CondensedExtraBold'
[1535:63699] -------------
[1535:63699] family:'Galvji'
[1535:63699]     font:'Galvji'
[1535:63699]     font:'Galvji-Bold'
[1535:63699] -------------
[1535:63699] family:'Geeza Pro'
[1535:63699]     font:'GeezaPro'
[1535:63699]     font:'GeezaPro-Bold'
[1535:63699] -------------
[1535:63699] family:'Georgia'
[1535:63699]     font:'Georgia'
[1535:63699]     font:'Georgia-Italic'
[1535:63699]     font:'Georgia-Bold'
[1535:63699]     font:'Georgia-BoldItalic'
[1535:63699] -------------
[1535:63699] family:'Gill Sans'
[1535:63699]     font:'GillSans'
[1535:63699]     font:'GillSans-Italic'
[1535:63699]     font:'GillSans-Light'
[1535:63699]     font:'GillSans-LightItalic'
[1535:63699]     font:'GillSans-SemiBold'
[1535:63699]     font:'GillSans-SemiBoldItalic'
[1535:63699]     font:'GillSans-Bold'
[1535:63699]     font:'GillSans-BoldItalic'
[1535:63699]     font:'GillSans-UltraBold'
[1535:63699] -------------
[1535:63699] family:'Grantha Sangam MN'
[1535:63699]     font:'GranthaSangamMN-Regular'
[1535:63699]     font:'GranthaSangamMN-Bold'
[1535:63699] -------------
[1535:63699] family:'Helvetica'
[1535:63699]     font:'Helvetica'
[1535:63699]     font:'Helvetica-Oblique'
[1535:63699]     font:'Helvetica-Light'
[1535:63699]     font:'Helvetica-LightOblique'
[1535:63699]     font:'Helvetica-Bold'
[1535:63699]     font:'Helvetica-BoldOblique'
[1535:63699] -------------
[1535:63699] family:'Helvetica Neue'
[1535:63699]     font:'HelveticaNeue'
[1535:63699]     font:'HelveticaNeue-Italic'
[1535:63699]     font:'HelveticaNeue-UltraLight'
[1535:63699]     font:'HelveticaNeue-UltraLightItalic'
[1535:63699]     font:'HelveticaNeue-Thin'
[1535:63699]     font:'HelveticaNeue-ThinItalic'
[1535:63699]     font:'HelveticaNeue-Light'
[1535:63699]     font:'HelveticaNeue-LightItalic'
[1535:63699]     font:'HelveticaNeue-Medium'
[1535:63699]     font:'HelveticaNeue-MediumItalic'
[1535:63699]     font:'HelveticaNeue-Bold'
[1535:63699]     font:'HelveticaNeue-BoldItalic'
[1535:63699]     font:'HelveticaNeue-CondensedBold'
[1535:63699]     font:'HelveticaNeue-CondensedBlack'
[1535:63699] -------------
[1535:63699] family:'Hiragino Maru Gothic ProN'
[1535:63699]     font:'HiraMaruProN-W4'
[1535:63699] -------------
[1535:63699] family:'Hiragino Mincho ProN'
[1535:63699]     font:'HiraMinProN-W3'
[1535:63699]     font:'HiraMinProN-W6'
[1535:63699] -------------
[1535:63699] family:'Hiragino Sans'
[1535:63699]     font:'HiraginoSans-W3'
[1535:63699]     font:'HiraginoSans-W6'
[1535:63699]     font:'HiraginoSans-W7'
[1535:63699] -------------
[1535:63699] family:'Hoefler Text'
[1535:63699]     font:'HoeflerText-Regular'
[1535:63699]     font:'HoeflerText-Italic'
[1535:63699]     font:'HoeflerText-Black'
[1535:63699]     font:'HoeflerText-BlackItalic'
[1535:63699] -------------
[1535:63699] family:'Kailasa'
[1535:63699]     font:'Kailasa'
[1535:63699]     font:'Kailasa-Bold'
[1535:63699] -------------
[1535:63699] family:'Kefa'
[1535:63699]     font:'Kefa-Regular'
[1535:63699] -------------
[1535:63699] family:'Khmer Sangam MN'
[1535:63699]     font:'KhmerSangamMN'
[1535:63699] -------------
[1535:63699] family:'Kohinoor Bangla'
[1535:63699]     font:'KohinoorBangla-Regular'
[1535:63699]     font:'KohinoorBangla-Light'
[1535:63699]     font:'KohinoorBangla-Semibold'
[1535:63699] -------------
[1535:63699] family:'Kohinoor Devanagari'
[1535:63699]     font:'KohinoorDevanagari-Regular'
[1535:63699]     font:'KohinoorDevanagari-Light'
[1535:63699]     font:'KohinoorDevanagari-Semibold'
[1535:63699] -------------
[1535:63699] family:'Kohinoor Gujarati'
[1535:63699]     font:'KohinoorGujarati-Regular'
[1535:63699]     font:'KohinoorGujarati-Light'
[1535:63699]     font:'KohinoorGujarati-Bold'
[1535:63699] -------------
[1535:63699] family:'Kohinoor Telugu'
[1535:63699]     font:'KohinoorTelugu-Regular'
[1535:63699]     font:'KohinoorTelugu-Light'
[1535:63699]     font:'KohinoorTelugu-Medium'
[1535:63699] -------------
[1535:63699] family:'Lao Sangam MN'
[1535:63699]     font:'LaoSangamMN'
[1535:63699] -------------
[1535:63699] family:'Malayalam Sangam MN'
[1535:63699]     font:'MalayalamSangamMN'
[1535:63699]     font:'MalayalamSangamMN-Bold'
[1535:63699] -------------
[1535:63699] family:'Marker Felt'
[1535:63699]     font:'MarkerFelt-Thin'
[1535:63699]     font:'MarkerFelt-Wide'
[1535:63699] -------------
[1535:63699] family:'Menlo'
[1535:63699]     font:'Menlo-Regular'
[1535:63699]     font:'Menlo-Italic'
[1535:63699]     font:'Menlo-Bold'
[1535:63699]     font:'Menlo-BoldItalic'
[1535:63699] -------------
[1535:63699] family:'Mishafi'
[1535:63699]     font:'DiwanMishafi'
[1535:63699] -------------
[1535:63699] family:'Mukta Mahee'
[1535:63699]     font:'MuktaMahee-Regular'
[1535:63699]     font:'MuktaMahee-Light'
[1535:63699]     font:'MuktaMahee-Bold'
[1535:63699] -------------
[1535:63699] family:'Myanmar Sangam MN'
[1535:63699]     font:'MyanmarSangamMN'
[1535:63699]     font:'MyanmarSangamMN-Bold'
[1535:63699] -------------
[1535:63699] family:'Noteworthy'
[1535:63699]     font:'Noteworthy-Light'
[1535:63699]     font:'Noteworthy-Bold'
[1535:63699] -------------
[1535:63699] family:'Noto Nastaliq Urdu'
[1535:63699]     font:'NotoNastaliqUrdu'
[1535:63699]     font:'NotoNastaliqUrdu-Bold'
[1535:63699] -------------
[1535:63699] family:'Noto Sans Kannada'
[1535:63699]     font:'NotoSansKannada-Regular'
[1535:63699]     font:'NotoSansKannada-Light'
[1535:63699]     font:'NotoSansKannada-Bold'
[1535:63699] -------------
[1535:63699] family:'Noto Sans Myanmar'
[1535:63699]     font:'NotoSansMyanmar-Regular'
[1535:63699]     font:'NotoSansMyanmar-Light'
[1535:63699]     font:'NotoSansMyanmar-Bold'
[1535:63699] -------------
[1535:63699] family:'Noto Sans Oriya'
[1535:63699]     font:'NotoSansOriya'
[1535:63699]     font:'NotoSansOriya-Bold'
[1535:63699] -------------
[1535:63699] family:'Optima'
[1535:63699]     font:'Optima-Regular'
[1535:63699]     font:'Optima-Italic'
[1535:63699]     font:'Optima-Bold'
[1535:63699]     font:'Optima-BoldItalic'
[1535:63699]     font:'Optima-ExtraBlack'
[1535:63699] -------------
[1535:63699] family:'Palatino'
[1535:63699]     font:'Palatino-Roman'
[1535:63699]     font:'Palatino-Italic'
[1535:63699]     font:'Palatino-Bold'
[1535:63699]     font:'Palatino-BoldItalic'
[1535:63699] -------------
[1535:63699] family:'Papyrus'
[1535:63699]     font:'Papyrus'
[1535:63699]     font:'Papyrus-Condensed'
[1535:63699] -------------
[1535:63699] family:'Party LET'
[1535:63699]     font:'PartyLetPlain'
[1535:63699] -------------
[1535:63699] family:'PingFang HK'
[1535:63699]     font:'PingFangHK-Regular'
[1535:63699]     font:'PingFangHK-Ultralight'
[1535:63699]     font:'PingFangHK-Thin'
[1535:63699]     font:'PingFangHK-Light'
[1535:63699]     font:'PingFangHK-Medium'
[1535:63699]     font:'PingFangHK-Semibold'
[1535:63699] -------------
[1535:63699] family:'PingFang SC'
[1535:63699]     font:'PingFangSC-Regular'
[1535:63699]     font:'PingFangSC-Ultralight'
[1535:63699]     font:'PingFangSC-Thin'
[1535:63699]     font:'PingFangSC-Light'
[1535:63699]     font:'PingFangSC-Medium'
[1535:63699]     font:'PingFangSC-Semibold'
[1535:63699] -------------
[1535:63699] family:'PingFang TC'
[1535:63699]     font:'PingFangTC-Regular'
[1535:63699]     font:'PingFangTC-Ultralight'
[1535:63699]     font:'PingFangTC-Thin'
[1535:63699]     font:'PingFangTC-Light'
[1535:63699]     font:'PingFangTC-Medium'
[1535:63699]     font:'PingFangTC-Semibold'
[1535:63699] -------------
[1535:63699] family:'Rockwell'
[1535:63699]     font:'Rockwell-Regular'
[1535:63699]     font:'Rockwell-Italic'
[1535:63699]     font:'Rockwell-Bold'
[1535:63699]     font:'Rockwell-BoldItalic'
[1535:63699] -------------
[1535:63699] family:'Savoye LET'
[1535:63699]     font:'SavoyeLetPlain'
[1535:63699] -------------
[1535:63699] family:'Sinhala Sangam MN'
[1535:63699]     font:'SinhalaSangamMN'
[1535:63699]     font:'SinhalaSangamMN-Bold'
[1535:63699] -------------
[1535:63699] family:'Snell Roundhand'
[1535:63699]     font:'SnellRoundhand'
[1535:63699]     font:'SnellRoundhand-Bold'
[1535:63699]     font:'SnellRoundhand-Black'
[1535:63699] -------------
[1535:63699] family:'Symbol'
[1535:63699]     font:'Symbol'
[1535:63699] -------------
[1535:63699] family:'Tamil Sangam MN'
[1535:63699]     font:'TamilSangamMN'
[1535:63699]     font:'TamilSangamMN-Bold'
[1535:63699] -------------
[1535:63699] family:'Thonburi'
[1535:63699]     font:'Thonburi'
[1535:63699]     font:'Thonburi-Light'
[1535:63699]     font:'Thonburi-Bold'
[1535:63699] -------------
[1535:63699] family:'Times New Roman'
[1535:63699]     font:'TimesNewRomanPSMT'
[1535:63699]     font:'TimesNewRomanPS-ItalicMT'
[1535:63699]     font:'TimesNewRomanPS-BoldMT'
[1535:63699]     font:'TimesNewRomanPS-BoldItalicMT'
[1535:63699] -------------
[1535:63699] family:'Trebuchet MS'
[1535:63699]     font:'TrebuchetMS'
[1535:63699]     font:'TrebuchetMS-Italic'
[1535:63699]     font:'TrebuchetMS-Bold'
[1535:63699]     font:'Trebuchet-BoldItalic'
[1535:63699] -------------
[1535:63699] family:'Verdana'
[1535:63699]     font:'Verdana'
[1535:63699]     font:'Verdana-Italic'
[1535:63699]     font:'Verdana-Bold'
[1535:63699]     font:'Verdana-BoldItalic'
[1535:63699] -------------
[1535:63699] family:'Zapf Dingbats'
[1535:63699]     font:'ZapfDingbatsITC'
[1535:63699] -------------
[1535:63699] family:'Zapfino'
[1535:63699]     font:'Zapfino'
[1535:63699] -------------

*/

二.猜你喜欢


ChatGPT 3.5 国内中文镜像站免费使用啦
© 版权声明
THE END
喜欢就支持一下吧
点赞1 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容