<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/AttributeScopes/SwiftUIAttributes/KerningAttribute",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation",
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:10Foundation15AttributeScopesO7SwiftUIE0D12UIAttributesV07KerningB0O"
  },
  "title" : "AttributeScopes.SwiftUIAttributes.KerningAttribute"
}
-->

# AttributeScopes.SwiftUIAttributes.KerningAttribute

A key for the space added between specific pairs of characters in a run
of attributed text.

```
@frozen enum KerningAttribute
```

## Overview

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`](/documentation/Foundation/AttributeScopes/SwiftUIAttributes/TrackingAttribute).

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`AttributedStringKey`](/documentation/Foundation/AttributedStringKey)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Sendable`](/documentation/Swift/Sendable)

[`DecodableAttributedStringKey`](/documentation/Foundation/DecodableAttributedStringKey)

[`Copyable`](/documentation/Swift/Copyable)

[`EncodableAttributedStringKey`](/documentation/Foundation/EncodableAttributedStringKey)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)