Mac Guides | Samples

MonoMac.CoreText.CTLineBoundsOptions Enumeration

The kind of bounds computation that we want to perform on a CTLine.

Syntax

public enum CTLineBoundsOptions

Remarks

These options can be combined. In the graphic below, you can see the different bounds that are computed based on this flag.

The following image shows the effect that the options have on measuring text.

Members

Member NameDescription
ExcludeTypographicLeadingUse this option to exclude the typographic leading from the bounds computation (the space between baselines of different lines of text).
ExcludeTypographicShiftsDoes not take into account kerning or leading information when computing bounds for
UseGlyphPathBoundsThe bounds of every glyph. These are typographically not very interesting as they do not take into account the finer details of typography, this returns the bounding box for the actual text rendered.
UseHangingPunctuation

Hanging Punctuation is a way of typesetting punctuation marks and bullet points, most commonly quotation marks and hyphens, so that they do not disrupt the "flow" of a body of text or "break" the margin of alignment. It is so called because the punctuation appears to ‘hang’ in the margin of the text, and is not incorporated into the block or column of text. It is commonly used when text is fully justified.

When you pass this option, the bounds are computed by ignoring the standard punctuation from the text.

UseOpticalBounds This uses the optical bounds. Some fonts include information about the optical perception of the font, and it might not align perfectly with the bounding box of the text.

Requirements

Namespace: MonoMac.CoreText
Assembly: XamMac (in XamMac.dll)
Assembly Versions: 0.0.0.0

The members of MonoMac.CoreText.CTLineBoundsOptions are listed below.

See Also: Enum

Public Fields

ExcludeTypographicLeadingCTLineBoundsOptions. Use this option to exclude the typographic leading from the bounds computation (the space between baselines of different lines of text).
ExcludeTypographicShiftsCTLineBoundsOptions. Does not take into account kerning or leading information when computing bounds for
UseGlyphPathBoundsCTLineBoundsOptions. The bounds of every glyph. These are typographically not very interesting as they do not take into account the finer details of typography, this returns the bounding box for the actual text rendered.
UseHangingPunctuationCTLineBoundsOptions.

Hanging Punctuation is a way of typesetting punctuation marks and bullet points, most commonly quotation marks and hyphens, so that they do not disrupt the "flow" of a body of text or "break" the margin of alignment. It is so called because the punctuation appears to ‘hang’ in the margin of the text, and is not incorporated into the block or column of text. It is commonly used when text is fully justified.

When you pass this option, the bounds are computed by ignoring the standard punctuation from the text.

UseOpticalBoundsCTLineBoundsOptions. This uses the optical bounds. Some fonts include information about the optical perception of the font, and it might not align perfectly with the bounding box of the text.