For some fonts, the built-in line spacing is unpleasantly large.
SwiftUI gives us the Text
modifier .lineSpacing()
to adjust the spacing between lines of text (also called the leading, unrelated to leading/trailing). Its value specifies the number of points of additional spacing to place between consecutive lines of text, so that .lineSpacing(0)
results in no change. Unfortunately, it does not appear to respond to negative values; .lineSpacing(-10)
yields the same result as lineSpacing(0)
.
Does anyone know of a way to reduce line spacing in SwiftUI without resorting to UIKit?
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