Skip to content

Instantly share code, notes, and snippets.

@BetterProgramming
Created October 16, 2020 15:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BetterProgramming/54b4bc0109ffe4427b74965633ad13c4 to your computer and use it in GitHub Desktop.
Save BetterProgramming/54b4bc0109ffe4427b74965633ad13c4 to your computer and use it in GitHub Desktop.
guard let font = UIFont(name: "Proxima Nova-Regular", size: 34) else {
fatalError("Can't find the custom font")
}
let fontMetrics = UIFontMetrics(forTextStyle: .largeTitle)
label.font = fontMetrics.scaledFont(for: font)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment