<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSAttributedString/Key/tracking",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@NSTrackingAttributeName"
  },
  "title" : "tracking"
}
-->

# tracking

The amount to modify the default tracking.

```
static let tracking: NSAttributedString.Key
```

## Discussion

The value of this attribute is an [`NSNumber`](/documentation/Foundation/NSNumber) object containing a floating-point value. The value represents the amount of space, in points, to add between the specified characters. A positive value increases the spacing between characters, and a negative value brings the characters closer together. Specify `0` to disable tracking.

The effect of this attribute is similar to the effect of [`kern`](/documentation/Foundation/NSAttributedString/Key/kern), but the system treats tracking as trailing whitespace. A nonzero amount of tracking disables nonessential ligatures, unless the [`ligature`](/documentation/Foundation/NSAttributedString/Key/ligature) attribute is present.

---

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)