I have this
Image(systemName: "arrow.right")
But how do I make it bold, semibold etc?
I am using the new SwiftUI.
SF Symbols 4 With over 4,000 symbols, SF Symbols is a library of iconography designed to integrate seamlessly with San Francisco, the system font for Apple platforms. Symbols come in nine weights and three scales, and automatically align with text labels.
When using the font
modifier, set a weight to the font you're passing.
For example, if you want to use one of the default text styles (which I recommend, since they adapt to the user's Dynamic Type setting), you can do it like this:
Image(systemName: "arrow.right")
.font(Font.title.weight(.ultraLight))
If you want to specify a font size, you can do it like this:
Image(systemName: "arrow.right")
.font(Font.system(size: 60, weight: .ultraLight))
For UIKit, symbols can be configured as follows:
UIImage(systemName: "arrow.right",
withConfiguration: UIImage.SymbolConfiguration(pointSize: 16, weight: .bold))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With