<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/AttributeScopes/CoreTextAttributes",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation15AttributeScopesO8CoreTextE0dE10AttributesV"
  },
  "title" : "AttributeScopes.CoreTextAttributes"
}
-->

# AttributeScopes.CoreTextAttributes

A namespace for attributes defined by CoreText.

```
struct CoreTextAttributes
```

## Overview

Note that this is *not* an
<doc://com.apple.documentation/documentation/Foundation/AttributeScope>,
but merely a namespace for
<doc://com.apple.documentation/documentation/Foundation/AttributedStringKey>s
that describe CoreText concepts. Those attributes may be used by *other
frameworks* to describe those concepts. Unless documented otherwise,
frameworks generally inidcate support for a certain attribute by adding
it to the framework’s
<doc://com.apple.documentation/documentation/Foundation/AttributeScope>.

CoreText specifically does not support Swift
<doc://com.apple.documentation/documentation/Foundation/AttributedStringKey>,
and will not recognize the attributes nested in this namespace when used
directly with CoreText API, no matter if used in an `AttributedString`
or `NSAttributedString`.

## Topics

### Enumerations

[`enum LineHeightAttribute`](/documentation/Foundation/AttributeScopes/CoreTextAttributes/LineHeightAttribute)

An attribute for defining the height of lines in a text.

[`enum TextAlignmentAttribute`](/documentation/Foundation/AttributeScopes/CoreTextAttributes/TextAlignmentAttribute)

An attribute defining the explicit horizontal alignment of a paragraph.

---

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)