<!--
{
  "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

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

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

[`whitespaceAction`](/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`.

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

Treated as tab character.

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

Causes line break.

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

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

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

Causes container break.

### Initializers

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



---

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)