50
57

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

iOS のシステム内蔵フォント一覧

Last updated at Posted at 2016-06-03

iOS でこのシステムフォントが使いたいとか、そもそもどのフォントが内蔵されてるのか知りたいとか、そんな需要たくさんあると思います。

というわけで、全てのシステム内蔵フォントを引っ張り出して iOS 上で描画する一覧アプリを作りました:
https://github.com/el-hoshino/iOSAllFontsDisplayer

まあ実現は非常に簡単です、単純に UIFont.familyNames()UIFont.fontNamesForFamilyName(_:) の二重ループでラベルを作ってスクロールビューに貼り付けるだけです。そこのソースコードを抽出するとこれだけです:

ViewController
	override func viewDidLoad() {
		super.viewDidLoad()
		// Do any additional setup after loading the view, typically from a nib.
		
		let view = UIScrollView(frame: self.view.bounds)
		view.autoresizingMask = [.FlexibleWidth, .FlexibleHeight]
		view.contentSize = .zero
		
		UIFont.familyNames().forEach { (familyName) in
			let fontsInFamily = UIFont.fontNamesForFamilyName(familyName)
			fontsInFamily.forEach({ (fontName) in
				print(fontName)
				let label = UILabel()
				label.text = "フォント:" + fontName
				label.font = UIFont(name: fontName, size: UIFont.labelFontSize())
				label.sizeToFit()
				label.frame.origin.y = view.contentSize.height
				view.contentSize.width = max(view.contentSize.width, label.frame.width)
				view.contentSize.height += label.frame.height + 10
				view.addSubview(label)
			})
		}
		
		self.view.addSubview(view)
		
	}

まあ実際 iOS 9 の iPhone 5s で実行して取得した一覧はこんな感じ:

Copperplate-Light
Copperplate
Copperplate-Bold
IowanOldStyle-Italic
IowanOldStyle-Roman
IowanOldStyle-BoldItalic
IowanOldStyle-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-Thin
AppleSDGothicNeo-UltraLight
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-Black
Avenir-MediumOblique
Avenir-BlackOblique
Avenir-Heavy
Avenir-LightOblique
Avenir-Oblique
AcademyEngravedLetPlain
DiwanMishafi
Futura-CondensedMedium
Futura-CondensedExtraBold
Futura-Medium
Futura-MediumItalic
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-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
EuphemiaUCAS-Italic
EuphemiaUCAS
EuphemiaUCAS-Bold
Zapfino
BodoniSvtyTwoOSITCTT-Book
BodoniSvtyTwoOSITCTT-Bold
BodoniSvtyTwoOSITCTT-BookIt

実行画面はこんな感じ:
Screen Shot 2016-06-03 at 15.35.50.png

まあ必要な方どうぞ

50
57
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
50
57

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?