<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.2.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGContext/setAllowsFontSmoothing(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Graphics",
      "CoreGraphics"
    ],
    "preciseIdentifier" : "c:@F@CGContextSetAllowsFontSmoothing"
  },
  "title" : "setAllowsFontSmoothing(_:)"
}
-->

# setAllowsFontSmoothing(_:)

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

```
func setAllowsFontSmoothing(_ allowsFontSmoothing: Bool)
```

## Parameters

`allowsFontSmoothing`

A Boolean value that specifies whether font smoothing is allowed in the specified context.

## Discussion

Font are smoothed if they are antialiased when drawn and if font smoothing is both allowed and enabled. For information on how to enable font smoothing, see the [`setShouldSmoothFonts(_:)`](/documentation/CoreGraphics/CGContext/setShouldSmoothFonts(_:)) function. It is not usually necessary to make changes to both parameters at the same time; either can be used to disable font smoothing.

This parameter is not part of the graphics state.

---

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)