Function

CTTypesetterSuggestClusterBreak

Suggests a cluster line breakpoint based on the width provided.

Declaration

CFIndex CTTypesetterSuggestClusterBreak(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 typographic cluster-break calculations. The break calculations include the character starting at startIndex.

width

The requested typographic cluster-break width.

Return Value

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

Discussion

This cluster break is similar to a character break, except that it does not break apart linguistic clusters. No other contextual analysis is done. This can be used by the caller to implement a different line-breaking scheme, such as hyphenation. A typographic cluster break can also be triggered by a hard-break character in the stream. This function is equivalent to CTTypesetterSuggestClusterBreakWithOffset with an offset of 0.0.

See Also

Breaking Lines

CTTypesetterSuggestLineBreak

Suggests a contextual line breakpoint based on the width provided.

CTTypesetterSuggestLineBreakWithOffset

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

CTTypesetterSuggestClusterBreakWithOffset

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