<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMedia",
  "identifier" : "/documentation/CoreMedia/kCMTextMarkupAttribute_Alignment",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Core Media"
    ],
    "preciseIdentifier" : "c:@kCMTextMarkupAttribute_Alignment"
  },
  "title" : "kCMTextMarkupAttribute_Alignment"
}
-->

# kCMTextMarkupAttribute_Alignment

The text alignment in the writing direction of the first line of text.

```
let kCMTextMarkupAttribute_Alignment: CFString
```

## Discussion

This attribute’s value must be one of the constants listed below that indicate the alignment in the writing direction of the first line of text of the cue. The value (or absence) of the [`kCMTextMarkupAttribute_VerticalLayout`](/documentation/CoreMedia/kCMTextMarkupAttribute_VerticalLayout) attribute indicates the writing direction. The default value of this attribute is [`kCMTextMarkupAlignmentType_Middle`](/documentation/CoreMedia/kCMTextMarkupAlignmentType_Middle).

If you use this attribute, apply it to the entire attributed string.

## Topics

### Alignment Types

[`kCMTextMarkupAlignmentType_Start`](/documentation/CoreMedia/kCMTextMarkupAlignmentType_Start)

An alignment type that visually aligns the text at its starting side.

[`kCMTextMarkupAlignmentType_Middle`](/documentation/CoreMedia/kCMTextMarkupAlignmentType_Middle)

An alignment type that visually aligns text in the center between its starting and ending sides.

[`kCMTextMarkupAlignmentType_End`](/documentation/CoreMedia/kCMTextMarkupAlignmentType_End)

An alignment type that visually aligns the text at its ending side.

[`kCMTextMarkupAlignmentType_Left`](/documentation/CoreMedia/kCMTextMarkupAlignmentType_Left)

An alignment type that visually aligns text from left-to-right.

[`kCMTextMarkupAlignmentType_Right`](/documentation/CoreMedia/kCMTextMarkupAlignmentType_Right)

An alignment type that visually aligns text from right-to-left.



---

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)