Platforms to show: All Mac Windows Linux Cross-Platform

CTParagraphStyleMBS class

Super class: CFObjectMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
class CoreText MBS MacCG Plugin 14.2 ✅ Yes ❌ No ❌ No ✅ Yes All
The CTParagraphStyle opaque type represents paragraph or ruler attributes in an attributed string.

A paragraph style object represents a complex attribute value in an attributed string, storing a number of subattributes that affect paragraph layout for the characters of the string. Among these subattributes are alignment, tab stops, writing direction, line-breaking mode, and indentation settings.
Subclass of the CFObjectMBS class.

Constants

Constant Value Description
kCTTextAlignmentCenter 2 One of the constants to specify text alignment. Text is visually center aligned.
kCTTextAlignmentJustified 3 One of the constants to specify text alignment. Text is fully justified. The last line in a paragraph is naturally aligned.
kCTTextAlignmentLeft 0 One of the constants to specify text alignment. Text is visually left aligned.
kCTTextAlignmentNatural 4 One of the constants to specify text alignment. Text uses the natural alignment of the text's script.
kCTTextAlignmentRight 1 One of the constants to specify text alignment. Text is visually right aligned.

Line Breaking

Constant Value Description
kCTLineBreakByCharWrapping 1 Wrapping occurs before the first character that doesn't fit.
kCTLineBreakByClipping 2 Lines are simply not drawn past the edge of the frame.
kCTLineBreakByTruncatingHead 3 Each line is displayed so that the end fits in the frame and the missing text is indicated by an ellipsis glyph.
kCTLineBreakByTruncatingMiddle 5 Each line is displayed so that the beginning and end fit in the container and the missing text is indicated by an ellipsis glyph in the middle.
kCTLineBreakByTruncatingTail 4 Each line is displayed so that the beginning fits in the container and the missing text is indicated by an ellipsis glyph.
kCTLineBreakByWordWrapping 0 Wrapping occurs at word boundaries unless the word itself doesn't fit on a single line.

Paragraph Styles

Constant Value Description
kCTParagraphStyleSpecifierAlignment 0 The text alignment. Natural text alignment is realized as left or right alignment, depending on the line sweep direction of the first script contained in the paragraph. Type: CTTextAlignment. Default: kCTNaturalTextAlignment. Application: CTFramesetter. more
kCTParagraphStyleSpecifierBaseWritingDirection 13 The base writing direction of the lines. Type: CTWritingDirection. Default: kCTWritingDirectionNatural. Application: CTFramesetter, CTTypesetter.
kCTParagraphStyleSpecifierDefaultTabInterval 5 The documentwide default tab interval. Tabs after the last specified by kCTParagraphStyleSpecifierTabStops are placed at integer multiples of this distance (if positive). Type: CGFloat. Default: 0.0. Application: CTFramesetter, CTTypesetter.
kCTParagraphStyleSpecifierFirstLineHeadIndent 1 The distance, in points, from the leading margin of a frame to the beginning of the paragraph's first line. This value is always nonnegative. Type: CGFloat. Default: 0.0. Application: CTFramesetter.
kCTParagraphStyleSpecifierHeadIndent 2 The distance, in points, from the leading margin of a text container to the beginning of lines other than the first. This value is always nonnegative. Type: CGFloat Default: 0.0 Application: CTFramesetter
kCTParagraphStyleSpecifierLineBoundsOptions 17 The options controlling the alignment of the line edges with the leading and trailing margins. more
kCTParagraphStyleSpecifierLineBreakMode 6 The mode that should be used to break lines when laying out the paragraph's text. Type: CTLineBreakMode. Default: kCTLineBreakByWordWrapping. Application: CTFramesetter
kCTParagraphStyleSpecifierLineHeightMultiple 7 The line height multiple. The natural line height of the receiver is multiplied by this factor (if positive) before being constrained by minimum and maximum line height. Type: CGFloat. Default: 0.0. Application: CTFramesetter.
kCTParagraphStyleSpecifierLineSpacing 10 Deprecated. Use kCTParagraphStyleSpecifierMaximumLineSpacing, kCTParagraphStyleSpecifierMinimumLineSpacing, and kCTParagraphStyleSpecifierLineSpaceAdjustment to control space between lines. The space in points added between lines within the paragraph (commonly known as leading). This value is always nonnegative. Type: CGFloat. Default: 0.0. Application: CTFramesetter.
kCTParagraphStyleSpecifierLineSpacingAdjustment 16 The space in points added between lines within the paragraph (commonly known as leading).
Available in OS X v10.7 and later.
kCTParagraphStyleSpecifierMaximumLineHeight 8 The maximum height that any line in the frame will occupy, regardless of the font size or size of any attached graphic. Glyphs and graphics exceeding this height will overlap neighboring lines. A maximum height of 0 implies no line height limit. This value is always nonnegative. Type: CGFloat. Default: 0.0. Application: CTFramesetter.
kCTParagraphStyleSpecifierMaximumLineSpacing 14 The maximum space in points between lines within the paragraph (commonly known as leading). This value is always nonnegative.
Available in OS X v10.7 and later.
kCTParagraphStyleSpecifierMinimumLineHeight 9 The minimum height that any line in the frame will occupy, regardless of the font size or size of any attached graphic. This value is always nonnegative. Type: CGFloat. Default: 0.0. Application: CTFramesetter.
kCTParagraphStyleSpecifierMinimumLineSpacing 15 The minimum space in points between lines within the paragraph (commonly known as leading). This value is always nonnegative.
Available in OS X v10.7 and later.
kCTParagraphStyleSpecifierParagraphSpacing 11 The space added at the end of the paragraph to separate it from the following paragraph. This value is always nonnegative and is determined by adding the previous paragraph's kCTParagraphStyleSpecifierParagraphSpacing setting and the current paragraph's kCTParagraphStyleSpecifierParagraphSpacingBefore setting. Type: CGFloat. Default: 0.0. Application: CTFramesetter.
kCTParagraphStyleSpecifierParagraphSpacingBefore 12 The distance between the paragraph's top and the beginning of its text content. Type: CGFloat. Default: 0.0. Application: CTFramesetter.
kCTParagraphStyleSpecifierTabStops 4 The CTTextTab objects, sorted by location, that define the tab stops for the paragraph style. Type: CFArray of CTTextTabRef. Default: 12 left-aligned tabs, spaced by 28.0 points. Application: CTFramesetter, CTTypesetter.
kCTParagraphStyleSpecifierTailIndent 3 The distance, in points, from the margin of a frame to the end of lines. If positive, this value is the distance from the leading margin (for example, the left margin in left-to-right text). If 0 or negative, it's the distance from the trailing margin. Type: CGFloat. Default: 0.0. Application: CTFramesetter.

Writing Direction

Constant Value Description
kCTWritingDirectionLeftToRight 0 The writing direction is left to right.
kCTWritingDirectionNatural -1 The writing direction is algorithmically determined using the Unicode Bidirectional Algorithm rules P2 and P3.
kCTWritingDirectionRightToLeft 1 The writing direction is right to left.

Super class CFObjectMBS

This class has no sub classes.

Blog Entries


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


CTMutableFontCollectionMBS   -   CTParagraphStyleSettingMBS


The biggest plugin in space...