- Add a new Swift Package into the Swift Playgrounds project
- Paste in
https://github.com/jiachenyee/Font
as the Package URL. - Select Add to Package
Text("Hello!")
.font(.custom(.myFontName))
Text("Hello!")
.font(.custom(.myFontName()))
Text("Hello!")
.font(.custom(.myFontName(weight: .bold)))
Text("Hello!")
.font(.custom(.myFontName))
Text("Hello!")
.font(.custom(.myFontName, size: 100))
Set font size relative to another font type using Apple's relativeTo:
font sizes.
Text("Hello!")
.font(.custom(.myFontName, size: 100, relativeTo: .title))