One often overlooked element in mobile application design is the font. While the focus during design and development typically centers on colors and images, paying attention to font choice can significantly enhance your app’s appeal. If you’re interested in giving your app a unique improvement that sets it apart, this insightful post is for you.
In SwiftUI are existing four value for the font width:
- Standard
- Compressed
- Expanded
- Condensed
In the code:
struct ContentView: View { var body: some View { VStack { Text("Hello world") .fontWidth(.compressed) Text("Hello world") .fontWidth(.expanded) Text("Hello world") .fontWidth(.condensed) }.font(.largeTitle) } }
To have this:
How you can see it’s very simple to have nice screen changing only the font width.
Note: English is not my native language, so I apologize for any errors. I use AI solely to generate the banner of the post; the content is human-generated.
To subscribe to my newsletter [https://nicoladefilippo.com/#mailinglist]