<!--
{
  "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/setShouldSubpixelPositionFonts(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core Graphics",
      "CoreGraphics"
    ],
    "preciseIdentifier" : "c:@F@CGContextSetShouldSubpixelPositionFonts"
  },
  "title" : "setShouldSubpixelPositionFonts(_:)"
}
-->

# setShouldSubpixelPositionFonts(_:)

Enables or disables subpixel positioning in a graphics context.

```
func setShouldSubpixelPositionFonts(_ shouldSubpixelPositionFonts: Bool)
```

## Parameters

`shouldSubpixelPositionFonts`

A Boolean value that specifies whether to enable subpixel positioning.

## Discussion

When enabled, the graphics context may position glyphs on nonintegral pixel boundaries. When disabled, the position of glyphs are always forced to integral pixel boundaries.

This parameter is 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)