Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for UIFontMetrics #293

Closed
noremac opened this issue Jun 6, 2017 · 0 comments
Closed

Add support for UIFontMetrics #293

noremac opened this issue Jun 6, 2017 · 0 comments

Comments

@noremac
Copy link
Collaborator

noremac commented Jun 6, 2017

UIFontMetrics was announced as a new feature in iOS 11 to help deal with custom fonts and dynamic type. It looks like it accomplishes something similar to the various adapt functions in BonMot.

Here's an example from one of the session videos (no VOD link yet)

let bodyMetrics = UIFontMetrics(forTextStyle: .body)

let standardFont = ... // any font you want at the standard type size
let font = bodyMetrics.scaledFont(for: standardFont)

More can be read about it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant