Swash icon indicating copy to clipboard operation
Swash copied to clipboard

SwiftUI support

Open AccuPhoenix01 opened this issue 5 years ago • 1 comments

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 avatar Sep 25 '20 14:09 AccuPhoenix01

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.

AccuPhoenix01 avatar Sep 25 '20 15:09 AccuPhoenix01