AttributeScopes.SwiftUIAttributes.KerningAttribute
A key for the space added between specific pairs of characters in a run of attributed text.
Declaration
@frozen enum KerningAttributeOverview
Kerning adjusts the gap between individual pairs, such as the two letters in “AV”, so that the pair looks evenly spaced. Give a positive value to open the pairs up and a negative value to tighten them:
var title = AttributedString("AVIATION")
title.kern = 2
Text(title)To space every character of a run apart by the same amount instead, use AttributeScopes.SwiftUIAttributes.TrackingAttribute.