Instance Method


Returns whether the line being laid out should be broken by hyphenating at the specified character.


- (BOOL)shouldBreakLineByHyphenatingBeforeCharacterAtIndex:(NSUInteger)charIndex;



The index of the character just after the proposed hyphenation would occur.

Return Value

YES if the line should be broken by hyphenating, NO otherwise.


The typesetter calls this method, if implemented by a subclass, before breaking a line by hyphenating before the character at charIndex, enabling the subclass to control line breaking.

A subclass can override this method to customize the text layout process. If the method returns NO, the typesetter continues looking for a break point.

See Also

Laying Out Glyphs

- layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:nextGlyphIndex:

Lays out glyphs in the specified layout manager starting at a specified glyph.

- boundingBoxForControlGlyphAtIndex:forTextContainer:proposedLineFragment:glyphPosition:characterIndex:

Returns the bounding rectangle for the specified control glyph with the specified parameters.

- getLineFragmentRect:usedRect:forParagraphSeparatorGlyphRange:atProposedOrigin:

Calculates the line fragment rectangle and line fragment used rectangle for blank lines.

- getLineFragmentRect:usedRect:remainingRect:forStartingGlyphAtIndex:proposedRect:lineSpacing:paragraphSpacingBefore:paragraphSpacingAfter:

Calculates line fragment rectangle, line fragment used rectangle, and remaining rectangle for a line fragment.

- hyphenCharacterForGlyphAtIndex:

Returns the hyphen character to be inserted after the specified glyph.

- hyphenationFactorForGlyphAtIndex:

Returns the hyphenation factor in effect at a specified location.

- shouldBreakLineByWordBeforeCharacterAtIndex:

Returns whether the line being laid out should be broken by a word break at the specified character.

- willSetLineFragmentRect:forGlyphRange:usedRect:baselineOffset:

Called by the typesetter just prior to storing the actual line fragment rectangle location in the layout manager.

- setHardInvalidation:forGlyphRange:

Sets whether to force the layout manager to invalidate the specified portion of the glyph cache when invalidating layout.