Function

CTTypesetterSuggestLineBreak

Suggests a contextual line breakpoint based on the width provided.

Declaration

CFIndex CTTypesetterSuggestLineBreak(CTTypesetterRef typesetter, CFIndex startIndex, double width);

Parameters

typesetter

The typesetter that creates the line. This parameter is required and cannot be set to NULL.

startIndex

The starting point for the line-break calculations. The break calculations include the character starting at startIndex.

width

The requested line-break width.

Return Value

A count of the characters from startIndex that would cause the line break. The value returned can be used to construct a character range for CTTypesetterCreateLine.

Discussion

The line break can be triggered either by a hard-break character in the stream or by filling the specified width with characters. This function is equivalent to CTTypesetterSuggestLineBreakWithOffset with an offset of 0.0.

See Also

Breaking Lines

CTTypesetterSuggestLineBreakWithOffset

Suggests a contextual line breakpoint based on the width provided and the specified offset.

CTTypesetterSuggestClusterBreak

Suggests a cluster line breakpoint based on the width provided.

CTTypesetterSuggestClusterBreakWithOffset

Suggests a cluster line breakpoint based on the specified width and line offset.