<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTypesetterControlCharacterAction",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSTypesetterControlCharacterAction"
  },
  "title" : "NSTypesetterControlCharacterAction"
}
-->

# NSTypesetterControlCharacterAction

The following constants are possible values returned by the [`actionForControlCharacter(at:)`](/documentation/AppKit/NSTypesetter/actionForControlCharacter(at:)) method to determine the action associated with a control character.

```
struct NSTypesetterControlCharacterAction
```

## Topics

### Constants

[`NSTypesetterZeroAdvancementAction`](/documentation/AppKit/NSTypesetterControlCharacterAction/zeroAdvancementAction)

Glyphs with this action are filtered out from layout `(notShownAttribute == YES)`.

[`NSTypesetterWhitespaceAction`](/documentation/AppKit/NSTypesetterControlCharacterAction/whitespaceAction)

The width for glyphs with this action are determined by [`boundingBox(forControlGlyphAt:for:proposedLineFragment:glyphPosition:characterIndex:)`](/documentation/AppKit/NSTypesetter/boundingBox(forControlGlyphAt:for:proposedLineFragment:glyphPosition:characterIndex:)), if the method is implemented; otherwise, same as `NSTypesetterZeroAdvancementAction`.

[`NSTypesetterHorizontalTabAction`](/documentation/AppKit/NSTypesetterControlCharacterAction/horizontalTabAction)

Treated as tab character.

[`NSTypesetterLineBreakAction`](/documentation/AppKit/NSTypesetterControlCharacterAction/lineBreakAction)

Causes line break.

[`NSTypesetterParagraphBreakAction`](/documentation/AppKit/NSTypesetterControlCharacterAction/paragraphBreakAction)

Causes paragraph break; the value returned by [`firstLineHeadIndent`](/documentation/AppKit/NSParagraphStyle/firstLineHeadIndent) is the advancement used for the following glyph.

[`NSTypesetterContainerBreakAction`](/documentation/AppKit/NSTypesetterControlCharacterAction/containerBreakAction)

Causes container break.

### Initializers

[`init(rawValue:)`](/documentation/AppKit/NSTypesetterControlCharacterAction/init(rawValue:))

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

---

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)