Created
March 16, 2018 22:09
-
-
Save kylejohnsonkj/0193705fff4065209532400a59c47a99 to your computer and use it in GitHub Desktop.
Adding a custom font to a Swift playground (Swift 4)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let fontPath = Bundle.main.path(forResource: "Custom Font", ofType: "ttf", inDirectory: "fonts") | |
let fontURL = NSURL(fileURLWithPath: fontPath!) | |
CTFontManagerRegisterFontsForURL(fontURL, CTFontManagerScope.process, nil) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment