Platforms to show: All Mac Windows Linux Cross-Platform

Back to CTTypesetterMBS class.

CTTypesetterMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The private constructor.

CTTypesetterMBS.CreateLine(location as Integer, length as Integer, offset as Double = 0.0) as CTLineMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Creates an immutable line from the typesetter at a specified line offset.

location and length: The string range on which the line is based. If the length portion of range is set to 0, then the typesetter continues to add glyphs to the line until it runs out of characters in the string. The location and length of the range must be within the bounds of the string, or the call will fail.
offset: The line position offset.

Returns a reference to a CTLine object if the call was successful; otherwise, nil.
The resultant line consists of glyphs in the correct visual order, ready to draw.
Available in OS X v10.6 and later.

CTTypesetterMBS.SuggestClusterBreak(startIndex as Integer, width as Double) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Suggests a cluster line breakpoint based on the width provided.

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 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.

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 SuggestClusterBreakWithOffset with an offset of 0.0.

Available in OS X v10.5 and later.

See also:

CTTypesetterMBS.SuggestClusterBreak(startIndex as Integer, width as Double, offset as Double) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Suggests a cluster line breakpoint based on the specified width and line offset.

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.
offset: The line offset position.

Returns 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 CreateLine.

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.

Available in OS X v10.6 and later.

See also:

CTTypesetterMBS.SuggestLineBreak(startIndex as Integer, width as Double) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Suggests a contextual line breakpoint based on the width provided.

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

Returns 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 CreateLine.

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 SuggestLineBreakWithOffset with an offset of 0.0.

Available in OS X v10.5 and later.

See also:

CTTypesetterMBS.SuggestLineBreak(startIndex as Integer, width as Double, offset as Double) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
Suggests a contextual line breakpoint based on the width provided and the specified offset.

startIndex: The starting point for the line-break calculations. The break calculations include the character starting at startIndex.
width: The requested line-break width.
offset: The line position offset.

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

The line break can be triggered either by a hard-break character in the stream or by filling the specified width with characters.
Available in OS X v10.6 and later.

See also:

The items on this page are in the following plugins: MBS MacCG Plugin.


The biggest plugin in space...