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

# setAllowsFontSubpixelQuantization(_:)

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

```
func setAllowsFontSubpixelQuantization(_ allowsFontSubpixelQuantization: Bool)
```

## Parameters

`allowsFontSubpixelQuantization`

A Boolean value that specifies whether subpixel quantization of glyphs is allowed in the specified context.

## Discussion

Sub-pixel quantization is used by the graphics context if it is allowed, enabled, and if glyphs would be drawn at subpixel positions. For information on how to enable subpixel quantization, see the [`setShouldSubpixelQuantizeFonts(_:)`](/documentation/CoreGraphics/CGContext/setShouldSubpixelQuantizeFonts(_:)) function.

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)