<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGTextDrawingMode",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@E@CGTextDrawingMode"
  },
  "title" : "CGTextDrawingMode"
}
-->

# CGTextDrawingMode

Modes for rendering text.

```
enum CGTextDrawingMode
```

## Overview

You provide a text drawing mode constant to the function [`setTextDrawingMode(_:)`](/documentation/CoreGraphics/CGContext/setTextDrawingMode(_:)) 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

[`CGTextDrawingMode.fill`](/documentation/CoreGraphics/CGTextDrawingMode/fill)

Perform a fill operation on the text.

[`CGTextDrawingMode.stroke`](/documentation/CoreGraphics/CGTextDrawingMode/stroke)

Perform a stroke operation on the text.

[`CGTextDrawingMode.fillStroke`](/documentation/CoreGraphics/CGTextDrawingMode/fillStroke)

Perform fill, then stroke operations on the text.

[`CGTextDrawingMode.invisible`](/documentation/CoreGraphics/CGTextDrawingMode/invisible)

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

[`CGTextDrawingMode.fillClip`](/documentation/CoreGraphics/CGTextDrawingMode/fillClip)

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

[`CGTextDrawingMode.strokeClip`](/documentation/CoreGraphics/CGTextDrawingMode/strokeClip)

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

[`CGTextDrawingMode.fillStrokeClip`](/documentation/CoreGraphics/CGTextDrawingMode/fillStrokeClip)

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

[`CGTextDrawingMode.clip`](/documentation/CoreGraphics/CGTextDrawingMode/clip)

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



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)