---
title: "textLayoutManager(_:shouldBreakLineBefore:hyphenating:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextlayoutmanagerdelegate/textlayoutmanager(_:shouldbreaklinebefore:hyphenating:)"
---

# textLayoutManager(_:shouldBreakLineBefore:hyphenating:)

The method the framework calls to determine the soft line break point.

## Declaration

```swift
optional func textLayoutManager(_ textLayoutManager: NSTextLayoutManager, shouldBreakLineBefore location: any NSTextLocation, hyphenating: Bool) -> Bool
```

## Parameters

- `textLayoutManager`: The text layout manager.
- `location`: The location of the proposed line break.
- `hyphenating`: A Boolean value that indicates the current hyphenation mode.

## Return Value

Return Value A Boolean value that indicates if the framework should break the line at the current location.

## Discussion

Discussion When hyphenating is false, NSTextLayoutManager tries to find the next line break opportunity before location. When hyphenating is true, it’s an auto-hyphenation point.

## See Also

### Responding to layout changes

- [textLayoutManager(_:renderingAttributesForLink:at:defaultAttributes:)](appkit/nstextlayoutmanagerdelegate/textlayoutmanager(_:renderingattributesforlink:at:defaultattributes:).md)
- [textLayoutManager(_:textLayoutFragmentFor:in:)](appkit/nstextlayoutmanagerdelegate/textlayoutmanager(_:textlayoutfragmentfor:in:).md)
