Mindgrub / Swash

Fonts in iOS made safe, expressive, and dynamic.
MIT License
75 stars 2 forks source link

SwiftUI support #8

Open AccuPhoenix01 opened 4 years ago

AccuPhoenix01 commented 4 years ago

SwiftUI doesn't treat UIFonts like its own SwiftUI Font class, so by default using the same paradigm of the pod doesn't work. Would be great to have baked-in SUI support that can use the same syntax as before.

BTW, I love Swash and has made it easy to use in new AccuWeather app. 🤩

AccuPhoenix01 commented 4 years ago

this might be as easy as: let swashFont = Solis.black.of(size: 18) as CTFont

then

Text("words")
  .font(Font(swashFont))

and really not require any change.