hyphenationFactor(forGlyphAt:)
Returns the hyphenation factor in effect at the specified glyph index.
Declaration
func hyphenationFactor(forGlyphAt glyphIndex: Int) -> FloatDiscussion
The hyphenation factor is a value ranging from 0.0 to 1.0 that controls when hyphenation is attempted. By default, the value is 0.0, meaning hyphenation is off. A factor of 1.0 causes hyphenation to be attempted always.
The typesetter calls this method with a proposed hyphenation point for a line break to find the hyphenation factor in effect at that time. A subclass can override this method to customize the text layout process.
See Also
Laying Out Glyphs
boundingBox(forControlGlyphAt:for:proposedLineFragment:glyphPosition:characterIndex:)getLineFragmentRect(_:usedRect:forParagraphSeparatorGlyphRange:atProposedOrigin:)hyphenCharacter(forGlyphAt:)shouldBreakLine(byHyphenatingBeforeCharacterAt:)shouldBreakLine(byWordBeforeCharacterAt:)willSetLineFragmentRect(_:forGlyphRange:usedRect:baselineOffset:)setHardInvalidation(_:forGlyphRange:)