Instantly share code, notes, and snippets.

Embed
What would you like to do?
iOS default font sizes - also available on https://www.iosfontsizes.com
let styles: [UIFont.TextStyle] = [
// iOS 11
.largeTitle,
// iOS 9
.title1, .title2, .title3, .callout,
// iOS 7
.headline, .subheadline, .body, .footnote, .caption1, .caption2,
]
for style in styles {
let font = UIFont.preferredFont(forTextStyle: style)
print("\(style): \(font.fontName) @ \(font.pointSize)")
}
Style Font Size
.largeTitle SFUIDisplay 34.0
.title1 SFUIDisplay
(-Light on iOS <=10)
28.0
.title2 SFUIDisplay 22.0
.title3 SFUIDisplay 20.0
.headline SFUIText-Semibold 17.0
.callout SFUIText 16.0
.subheadline SFUIText 15.0
.body SFUIText 17.0
.footnote SFUIText 13.0
.caption1 SFUIText 12.0
.caption2 SFUIText 11.0
@bagrawal

This comment has been minimized.

Copy link

bagrawal commented Apr 19, 2016

Thanks 👍
This is useful documentation :)

@NikolaKirev

This comment has been minimized.

Copy link

NikolaKirev commented Aug 24, 2017

Thank you!
I am guessing these results are from running the code with the default user font preferences?

@zacwest

This comment has been minimized.

Copy link
Owner

zacwest commented Aug 24, 2017

@NikolaKirev Correct, this is just at the default dynamic type size. You can see a graph of what happens to the type sizes in this graph.

@venkatchm

This comment has been minimized.

Copy link

venkatchm commented Jun 28, 2018

what are the font sizes for iPad?

@alexliuxe

This comment has been minimized.

Copy link

alexliuxe commented Aug 16, 2018

I think when considering accessibilities this won't be the correct size anymore.

@pawelkijowskizimperium

This comment has been minimized.

Copy link

pawelkijowskizimperium commented Jan 11, 2019

Useful... Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment