Enumeration

CGTextDrawingMode

Modes for rendering text.

Declaration

typedef enum CGTextDrawingMode : int32_t {
    ...
} CGTextDrawingMode;

Overview

You provide a text drawing mode constant to the function CGContextSetTextDrawingMode to set the current text drawing mode for a graphics context. Text drawing modes determine how Core Graphics renders individual glyphs onscreen. For example, you can set a text drawing mode to draw text filled in or outlined (stroked) or both. You can also create special effects with the text clipping drawing modes, such as clipping an image to a glyph shape.

Topics

Constants

kCGTextFill

Perform a fill operation on the text.

kCGTextStroke

Perform a stroke operation on the text.

kCGTextFillStroke

Perform fill, then stroke operations on the text.

kCGTextInvisible

Do not draw the text, but do update the text position.

kCGTextFillClip

Perform a fill operation, then intersect the text with the current clipping path.

kCGTextStrokeClip

Perform a stroke operation, then intersect the text with the current clipping path.

kCGTextFillStrokeClip

Perform fill then stroke operations, then intersect the text with the current clipping path.

kCGTextClip

Specifies to intersect the text with the current clipping path. This mode does not paint the text.

See Also

Drawing Text

CGContextGetTextMatrix

Returns the current text matrix.

CGContextGetTextPosition

Returns the location at which text is drawn.

CGContextSetTextPosition

Sets the location at which text is drawn.

CGContextSelectFont

Sets the font and font size in a graphics context.

Deprecated
CGContextSetCharacterSpacing

Sets the current character spacing.

CGContextSetFont

Sets the platform font in a graphics context.

CGContextSetFontSize

Sets the current font size.

CGContextSetTextDrawingMode

Sets the current text drawing mode.

CGContextSetAllowsFontSmoothing

Sets whether or not to allow font smoothing for a graphics context.

CGContextSetAllowsFontSubpixelPositioning

Sets whether or not to allow subpixel positioning for a graphics context.

CGContextSetAllowsFontSubpixelQuantization

Sets whether or not to allow subpixel quantization for a graphics context.

CGContextSetShouldSmoothFonts

Enables or disables font smoothing in a graphics context.

CGContextSetShouldSubpixelPositionFonts

Enables or disables subpixel positioning in a graphics context.

CGContextSetShouldSubpixelQuantizeFonts

Enables or disables subpixel quantization in a graphics context.

CGContextShowGlyphs

Displays an array of glyphs at the current text position.

Deprecated
CGContextShowGlyphsAtPoint

Displays an array of glyphs at a position you specify.

Deprecated
CGContextShowGlyphsWithAdvances

Draws an array of glyphs with varying offsets.

Deprecated
CGContextShowText

Displays a character array at the current text position, a point specified by the current text matrix.

Deprecated
CGContextShowTextAtPoint

Displays a character string at a position you specify.

Deprecated