shouldBreakLine(byHyphenatingBeforeCharacterAt:)
Breaks a line by hyphenating before the character at the specified index.
Declaration
func shouldBreakLine(byHyphenatingBeforeCharacterAt charIndex: Int) -> BoolDiscussion
The typesetter calls this method, if implemented by a subclass, before breaking a line by hyphenating before the character at the given character index, enabling the subclass to control line breaking. A subclass can override this method to customize the text layout process. If the method returns false, the typesetter continues looking for a break point.
See Also
Laying Out Glyphs
boundingBox(forControlGlyphAt:for:proposedLineFragment:glyphPosition:characterIndex:)getLineFragmentRect(_:usedRect:forParagraphSeparatorGlyphRange:atProposedOrigin:)hyphenCharacter(forGlyphAt:)hyphenationFactor(forGlyphAt:)shouldBreakLine(byWordBeforeCharacterAt:)willSetLineFragmentRect(_:forGlyphRange:usedRect:baselineOffset:)setHardInvalidation(_:forGlyphRange:)