<!--
{
  "documentType" : "article",
  "framework" : "Accessibility",
  "identifier" : "/documentation/Accessibility/horizontal-text",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Horizontal text"
}
-->

# Horizontal text

Lay out vertical text horizontally in your app when people turn on the Prefer Horizontal
Text setting.

## Discussion

People use the Prefer Horizontal Text setting to specify a preference for laying
out text horizontally in languages that support vertical text. By default, the setting
is off, which allows languages that support vertical text to lay out text vertically.
A person can turn on the setting to indicate that they prefer a horizontal text layout
where possible.

In your app, handle changes to the Prefer Horizontal Text setting to create an enjoyable
experience for people who choose to opt in to a horizontal text layout. Register
for the notification [`prefersHorizontalTextLayoutDidChangeNotification`](/documentation/Accessibility/AccessibilitySettings/prefersHorizontalTextLayoutDidChangeNotification) to respond to changes in this setting:

```swift
import Accessibility

NotificationCenter.default.addObserver(self,
    selector: #selector(prefersHorizontalTextChanged),
    name: NSNotification.Name.prefersHorizontalTextLayoutDidChangeNotification,
    object: nil)
```

When the Prefer Horizontal Text setting changes, perform changes to your UI to update
how you lay out text:

```swift
@objc 
func prefersHorizontalTextChanged(_ notification: Notification) {
    if AccessibilitySettings.prefersHorizontalTextLayout {
        // The setting is on. Use a horizontal layout for text where possible.
    } else {
        // The setting is off. Use a vertical layout for languages that support vertical text.
    }
}
```

Check the value of the Prefer Horizontal Text setting at any time by using [`prefersHorizontalTextLayout`](/documentation/Accessibility/AccessibilitySettings/prefersHorizontalTextLayout).

## Topics

### Horizontal text

[`static var prefersHorizontalTextLayout: Bool`](/documentation/Accessibility/AccessibilitySettings/prefersHorizontalTextLayout)

A Boolean value that indicates whether the system setting to prefer horizontal text for languages that support both vertical and horizontal text layout is on.

[`static var prefersHorizontalTextLayoutDidChangeNotification: Notification.Name`](/documentation/Accessibility/AccessibilitySettings/prefersHorizontalTextLayoutDidChangeNotification)

A notification that posts when the system setting to prefer horizontal text for languages that support both vertical and horizontal text layout changes.



---

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)