---
title: CGTextEncoding
framework: coregraphics
role: symbol
role_heading: Enumeration
path: coregraphics/cgtextencoding
---

# CGTextEncoding

Text encodings for fonts.

## Declaration

```swift
enum CGTextEncoding
```

## Overview

Overview For more information on setting the font in a graphics context, see selectFont(name:size:textEncoding:).

## Topics

### Constants

- [CGTextEncoding.encodingFontSpecific](coregraphics/cgtextencoding/encodingfontspecific.md)
- [CGTextEncoding.encodingMacRoman](coregraphics/cgtextencoding/encodingmacroman.md)

### Initializers

- [init(rawValue:)](coregraphics/cgtextencoding/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Constants

- [CGPathFillRule](coregraphics/cgpathfillrule.md)
