Instance Method

hyphenCharacter(forGlyphAt:)

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

Declaration

func hyphenCharacter(forGlyphAt glyphIndex: Int) -> UTF32Char

Parameters

glyphIndex

The index of the glyph in question.

Return Value

The hyphen character to be inserted after the glyph at glyphIndex.

Discussion

The typesetter calls this method before hyphenating. A subclass can override this method to return a different hyphen glyph.

See Also

Laying out Glyphs

func hyphenationFactor(forGlyphAt: Int) -> Float

Returns the hyphenation factor in effect at a specified location.

func shouldBreakLine(byHyphenatingBeforeCharacterAt: Int) -> Bool

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

func shouldBreakLine(byWordBeforeCharacterAt: Int) -> Bool

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

func willSetLineFragmentRect(NSRectPointer, forGlyphRange: NSRange, usedRect: NSRectPointer, baselineOffset: UnsafeMutablePointer<CGFloat>)

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