iOS默認(rèn)支持的字體庫

最近公司設(shè)計(jì)出了好多奇奇怪怪的字體,我就研究了一下iOS的API,果然發(fā)現(xiàn)有方法可以打印iOS默認(rèn)支持的字體捶箱。

方法如下:


    for familyName in UIFont.familyNames {
        
        print("\n>>>familyName: \(familyName)")
        
        for fontName in UIFont.fontNames(forFamilyName: familyName) {
            print("fontNames: \(fontName)")
        }
    }

具體打印如下,有興趣的童鞋可以親測动漾,很簡單:

>>>familyName: Copperplate
fontNames: Copperplate-Light
fontNames: Copperplate
fontNames: Copperplate-Bold

>>>familyName: Heiti SC

>>>familyName: Apple SD Gothic Neo
fontNames: AppleSDGothicNeo-Thin
fontNames: AppleSDGothicNeo-Light
fontNames: AppleSDGothicNeo-Regular
fontNames: AppleSDGothicNeo-Bold
fontNames: AppleSDGothicNeo-SemiBold
fontNames: AppleSDGothicNeo-UltraLight
fontNames: AppleSDGothicNeo-Medium

>>>familyName: Thonburi
fontNames: Thonburi
fontNames: Thonburi-Light
fontNames: Thonburi-Bold

>>>familyName: Gill Sans
fontNames: GillSans-Italic
fontNames: GillSans-SemiBold
fontNames: GillSans-UltraBold
fontNames: GillSans-Light
fontNames: GillSans-Bold
fontNames: GillSans
fontNames: GillSans-SemiBoldItalic
fontNames: GillSans-BoldItalic
fontNames: GillSans-LightItalic

>>>familyName: Marker Felt
fontNames: MarkerFelt-Thin
fontNames: MarkerFelt-Wide

>>>familyName: Hiragino Maru Gothic ProN
fontNames: HiraMaruProN-W4

>>>familyName: Courier New
fontNames: CourierNewPS-ItalicMT
fontNames: CourierNewPSMT
fontNames: CourierNewPS-BoldItalicMT
fontNames: CourierNewPS-BoldMT

>>>familyName: Kohinoor Telugu
fontNames: KohinoorTelugu-Regular
fontNames: KohinoorTelugu-Medium
fontNames: KohinoorTelugu-Light

>>>familyName: Heiti TC

>>>familyName: Avenir Next Condensed
fontNames: AvenirNextCondensed-Heavy
fontNames: AvenirNextCondensed-MediumItalic
fontNames: AvenirNextCondensed-Regular
fontNames: AvenirNextCondensed-UltraLightItalic
fontNames: AvenirNextCondensed-Medium
fontNames: AvenirNextCondensed-HeavyItalic
fontNames: AvenirNextCondensed-DemiBoldItalic
fontNames: AvenirNextCondensed-Bold
fontNames: AvenirNextCondensed-DemiBold
fontNames: AvenirNextCondensed-BoldItalic
fontNames: AvenirNextCondensed-Italic
fontNames: AvenirNextCondensed-UltraLight

>>>familyName: Tamil Sangam MN
fontNames: TamilSangamMN
fontNames: TamilSangamMN-Bold

>>>familyName: Helvetica Neue
fontNames: HelveticaNeue-UltraLightItalic
fontNames: HelveticaNeue-Medium
fontNames: HelveticaNeue-MediumItalic
fontNames: HelveticaNeue-UltraLight
fontNames: HelveticaNeue-Italic
fontNames: HelveticaNeue-Light
fontNames: HelveticaNeue-ThinItalic
fontNames: HelveticaNeue-LightItalic
fontNames: HelveticaNeue-Bold
fontNames: HelveticaNeue-Thin
fontNames: HelveticaNeue-CondensedBlack
fontNames: HelveticaNeue
fontNames: HelveticaNeue-CondensedBold
fontNames: HelveticaNeue-BoldItalic

>>>familyName: Gurmukhi MN
fontNames: GurmukhiMN-Bold
fontNames: GurmukhiMN

>>>familyName: Georgia
fontNames: Georgia-BoldItalic
fontNames: Georgia-Italic
fontNames: Georgia
fontNames: Georgia-Bold

>>>familyName: Times New Roman
fontNames: TimesNewRomanPS-ItalicMT
fontNames: TimesNewRomanPS-BoldItalicMT
fontNames: TimesNewRomanPS-BoldMT
fontNames: TimesNewRomanPSMT

>>>familyName: Sinhala Sangam MN
fontNames: SinhalaSangamMN-Bold
fontNames: SinhalaSangamMN

>>>familyName: Arial Rounded MT Bold
fontNames: ArialRoundedMTBold

>>>familyName: Kailasa
fontNames: Kailasa-Bold
fontNames: Kailasa

>>>familyName: Kohinoor Devanagari
fontNames: KohinoorDevanagari-Regular
fontNames: KohinoorDevanagari-Light
fontNames: KohinoorDevanagari-Semibold

>>>familyName: Kohinoor Bangla
fontNames: KohinoorBangla-Regular
fontNames: KohinoorBangla-Semibold
fontNames: KohinoorBangla-Light

>>>familyName: Chalkboard SE
fontNames: ChalkboardSE-Bold
fontNames: ChalkboardSE-Light
fontNames: ChalkboardSE-Regular

>>>familyName: Apple Color Emoji
fontNames: AppleColorEmoji

>>>familyName: PingFang TC
fontNames: PingFangTC-Regular
fontNames: PingFangTC-Thin
fontNames: PingFangTC-Medium
fontNames: PingFangTC-Semibold
fontNames: PingFangTC-Light
fontNames: PingFangTC-Ultralight

>>>familyName: Gujarati Sangam MN
fontNames: GujaratiSangamMN
fontNames: GujaratiSangamMN-Bold

>>>familyName: Geeza Pro
fontNames: GeezaPro-Bold
fontNames: GeezaPro

>>>familyName: Damascus
fontNames: DamascusBold
fontNames: DamascusLight
fontNames: Damascus
fontNames: DamascusMedium
fontNames: DamascusSemiBold

>>>familyName: Noteworthy
fontNames: Noteworthy-Bold
fontNames: Noteworthy-Light

>>>familyName: Avenir
fontNames: Avenir-Oblique
fontNames: Avenir-HeavyOblique
fontNames: Avenir-Heavy
fontNames: Avenir-BlackOblique
fontNames: Avenir-BookOblique
fontNames: Avenir-Roman
fontNames: Avenir-Medium
fontNames: Avenir-Black
fontNames: Avenir-Light
fontNames: Avenir-MediumOblique
fontNames: Avenir-Book
fontNames: Avenir-LightOblique

>>>familyName: Mishafi
fontNames: DiwanMishafi

>>>familyName: Academy Engraved LET
fontNames: AcademyEngravedLetPlain

>>>familyName: Futura
fontNames: Futura-CondensedExtraBold
fontNames: Futura-Medium
fontNames: Futura-Bold
fontNames: Futura-CondensedMedium
fontNames: Futura-MediumItalic

>>>familyName: Party LET
fontNames: PartyLetPlain

>>>familyName: Kannada Sangam MN
fontNames: KannadaSangamMN-Bold
fontNames: KannadaSangamMN

>>>familyName: Arial Hebrew
fontNames: ArialHebrew-Bold
fontNames: ArialHebrew-Light
fontNames: ArialHebrew

>>>familyName: Farah
fontNames: Farah

>>>familyName: Arial
fontNames: Arial-BoldMT
fontNames: Arial-BoldItalicMT
fontNames: Arial-ItalicMT
fontNames: ArialMT

>>>familyName: Chalkduster
fontNames: Chalkduster

>>>familyName: Kefa
fontNames: Kefa-Regular

>>>familyName: Hoefler Text
fontNames: HoeflerText-Italic
fontNames: HoeflerText-Black
fontNames: HoeflerText-Regular
fontNames: HoeflerText-BlackItalic

>>>familyName: Optima
fontNames: Optima-ExtraBlack
fontNames: Optima-BoldItalic
fontNames: Optima-Italic
fontNames: Optima-Regular
fontNames: Optima-Bold

>>>familyName: Palatino
fontNames: Palatino-Italic
fontNames: Palatino-Roman
fontNames: Palatino-BoldItalic
fontNames: Palatino-Bold

>>>familyName: Malayalam Sangam MN
fontNames: MalayalamSangamMN-Bold
fontNames: MalayalamSangamMN

>>>familyName: Al Nile
fontNames: AlNile
fontNames: AlNile-Bold

>>>familyName: Lao Sangam MN
fontNames: LaoSangamMN

>>>familyName: Bradley Hand
fontNames: BradleyHandITCTT-Bold

>>>familyName: Hiragino Mincho ProN
fontNames: HiraMinProN-W3
fontNames: HiraMinProN-W6

>>>familyName: PingFang HK
fontNames: PingFangHK-Medium
fontNames: PingFangHK-Thin
fontNames: PingFangHK-Regular
fontNames: PingFangHK-Ultralight
fontNames: PingFangHK-Semibold
fontNames: PingFangHK-Light

>>>familyName: Helvetica
fontNames: Helvetica-Oblique
fontNames: Helvetica-BoldOblique
fontNames: Helvetica
fontNames: Helvetica-Light
fontNames: Helvetica-Bold
fontNames: Helvetica-LightOblique

>>>familyName: Courier
fontNames: Courier-BoldOblique
fontNames: Courier-Oblique
fontNames: Courier
fontNames: Courier-Bold

>>>familyName: Cochin
fontNames: Cochin-Italic
fontNames: Cochin-Bold
fontNames: Cochin
fontNames: Cochin-BoldItalic

>>>familyName: Trebuchet MS
fontNames: TrebuchetMS-Bold
fontNames: TrebuchetMS-Italic
fontNames: Trebuchet-BoldItalic
fontNames: TrebuchetMS

>>>familyName: Devanagari Sangam MN
fontNames: DevanagariSangamMN
fontNames: DevanagariSangamMN-Bold

>>>familyName: Oriya Sangam MN
fontNames: OriyaSangamMN
fontNames: OriyaSangamMN-Bold

>>>familyName: Rockwell
fontNames: Rockwell-Italic
fontNames: Rockwell-Regular
fontNames: Rockwell-Bold
fontNames: Rockwell-BoldItalic

>>>familyName: Snell Roundhand
fontNames: SnellRoundhand
fontNames: SnellRoundhand-Bold
fontNames: SnellRoundhand-Black

>>>familyName: Zapf Dingbats
fontNames: ZapfDingbatsITC

>>>familyName: Bodoni 72
fontNames: BodoniSvtyTwoITCTT-Bold
fontNames: BodoniSvtyTwoITCTT-BookIta
fontNames: BodoniSvtyTwoITCTT-Book

>>>familyName: Verdana
fontNames: Verdana-Italic
fontNames: Verdana
fontNames: Verdana-Bold
fontNames: Verdana-BoldItalic

>>>familyName: American Typewriter
fontNames: AmericanTypewriter-CondensedBold
fontNames: AmericanTypewriter-Condensed
fontNames: AmericanTypewriter-CondensedLight
fontNames: AmericanTypewriter
fontNames: AmericanTypewriter-Bold
fontNames: AmericanTypewriter-Semibold
fontNames: AmericanTypewriter-Light

>>>familyName: Avenir Next
fontNames: AvenirNext-Medium
fontNames: AvenirNext-DemiBoldItalic
fontNames: AvenirNext-DemiBold
fontNames: AvenirNext-HeavyItalic
fontNames: AvenirNext-Regular
fontNames: AvenirNext-Italic
fontNames: AvenirNext-MediumItalic
fontNames: AvenirNext-UltraLightItalic
fontNames: AvenirNext-BoldItalic
fontNames: AvenirNext-Heavy
fontNames: AvenirNext-Bold
fontNames: AvenirNext-UltraLight

>>>familyName: Baskerville
fontNames: Baskerville-SemiBoldItalic
fontNames: Baskerville-SemiBold
fontNames: Baskerville-BoldItalic
fontNames: Baskerville
fontNames: Baskerville-Bold
fontNames: Baskerville-Italic

>>>familyName: Khmer Sangam MN
fontNames: KhmerSangamMN

>>>familyName: Didot
fontNames: Didot-Bold
fontNames: Didot
fontNames: Didot-Italic

>>>familyName: Savoye LET
fontNames: SavoyeLetPlain

>>>familyName: Bodoni Ornaments
fontNames: BodoniOrnamentsITCTT

>>>familyName: Symbol
fontNames: Symbol

>>>familyName: Charter
fontNames: Charter-BlackItalic
fontNames: Charter-Bold
fontNames: Charter-Roman
fontNames: Charter-Black
fontNames: Charter-BoldItalic
fontNames: Charter-Italic

>>>familyName: Menlo
fontNames: Menlo-BoldItalic
fontNames: Menlo-Bold
fontNames: Menlo-Italic
fontNames: Menlo-Regular

>>>familyName: Noto Nastaliq Urdu
fontNames: NotoNastaliqUrdu

>>>familyName: Bodoni 72 Smallcaps
fontNames: BodoniSvtyTwoSCITCTT-Book

>>>familyName: DIN Alternate
fontNames: DINAlternate-Bold

>>>familyName: Papyrus
fontNames: Papyrus-Condensed
fontNames: Papyrus

>>>familyName: Hiragino Sans
fontNames: HiraginoSans-W3
fontNames: HiraginoSans-W6

>>>familyName: PingFang SC
fontNames: PingFangSC-Medium
fontNames: PingFangSC-Semibold
fontNames: PingFangSC-Light
fontNames: PingFangSC-Ultralight
fontNames: PingFangSC-Regular
fontNames: PingFangSC-Thin

>>>familyName: Myanmar Sangam MN
fontNames: MyanmarSangamMN
fontNames: MyanmarSangamMN-Bold

>>>familyName: Noto Sans Chakma
fontNames: NotoSansChakma-Regular

>>>familyName: Zapfino
fontNames: Zapfino

>>>familyName: Telugu Sangam MN

>>>familyName: Bodoni 72 Oldstyle
fontNames: BodoniSvtyTwoOSITCTT-BookIt
fontNames: BodoniSvtyTwoOSITCTT-Book
fontNames: BodoniSvtyTwoOSITCTT-Bold

>>>familyName: Euphemia UCAS
fontNames: EuphemiaUCAS
fontNames: EuphemiaUCAS-Italic
fontNames: EuphemiaUCAS-Bold

>>>familyName: Bangla Sangam MN

>>>familyName: DIN Condensed
fontNames: DINCondensed-Bold
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末丁屎,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子旱眯,更是在濱河造成了極大的恐慌晨川,老刑警劉巖,帶你破解...
    沈念sama閱讀 206,311評論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件删豺,死亡現(xiàn)場離奇詭異共虑,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)呀页,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,339評論 2 382
  • 文/潘曉璐 我一進(jìn)店門妈拌,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人蓬蝶,你說我怎么就攤上這事尘分。” “怎么了疾党?”我有些...
    開封第一講書人閱讀 152,671評論 0 342
  • 文/不壞的土叔 我叫張陵音诫,是天一觀的道長。 經(jīng)常有香客問我雪位,道長竭钝,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 55,252評論 1 279
  • 正文 為了忘掉前任雹洗,我火速辦了婚禮香罐,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘时肿。我一直安慰自己庇茫,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 64,253評論 5 371
  • 文/花漫 我一把揭開白布螃成。 她就那樣靜靜地躺著旦签,像睡著了一般查坪。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上宁炫,一...
    開封第一講書人閱讀 49,031評論 1 285
  • 那天偿曙,我揣著相機(jī)與錄音,去河邊找鬼羔巢。 笑死望忆,一個胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的竿秆。 我是一名探鬼主播启摄,決...
    沈念sama閱讀 38,340評論 3 399
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼幽钢!你這毒婦竟也來了歉备?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 36,973評論 0 259
  • 序言:老撾萬榮一對情侶失蹤匪燕,失蹤者是張志新(化名)和其女友劉穎威创,沒想到半個月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體谎懦,經(jīng)...
    沈念sama閱讀 43,466評論 1 300
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 35,937評論 2 323
  • 正文 我和宋清朗相戀三年溃斋,在試婚紗的時候發(fā)現(xiàn)自己被綠了界拦。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 38,039評論 1 333
  • 序言:一個原本活蹦亂跳的男人離奇死亡梗劫,死狀恐怖享甸,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情梳侨,我是刑警寧澤蛉威,帶...
    沈念sama閱讀 33,701評論 4 323
  • 正文 年R本政府宣布,位于F島的核電站走哺,受9級特大地震影響蚯嫌,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜丙躏,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,254評論 3 307
  • 文/蒙蒙 一择示、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧晒旅,春花似錦栅盲、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,259評論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽扒寄。三九已至,卻和暖如春拟烫,著一層夾襖步出監(jiān)牢的瞬間该编,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 31,485評論 1 262
  • 我被黑心中介騙來泰國打工构灸, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留上渴,地道東北人。 一個月前我還...
    沈念sama閱讀 45,497評論 2 354
  • 正文 我出身青樓喜颁,卻偏偏與公主長得像稠氮,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子半开,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 42,786評論 2 345

推薦閱讀更多精彩內(nèi)容