---
title: "setAllowsFontSubpixelPositioning(_:)"
framework: coregraphics
role: symbol
role_heading: Instance Method
path: "coregraphics/cgcontext/setallowsfontsubpixelpositioning(_:)"
---

# setAllowsFontSubpixelPositioning(_:)

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

## Declaration

```swift
func setAllowsFontSubpixelPositioning(_ allowsFontSubpixelPositioning: Bool)
```

## Parameters

- `allowsFontSubpixelPositioning`: A Boolean value that specifies whether subpixel positioning of glyphs is allowed in the specified context.

## Discussion

Discussion Sub-pixel positioning is used by the graphics context if it is allowed, enabled, and if the font itself is antialiased when drawn. For information on how to enable subpixel positioning, see the setShouldSubpixelPositionFonts(_:) function. This parameter is not part of the graphics state.

## See Also

### Drawing Text

- [textMatrix](coregraphics/cgcontext/textmatrix.md)
- [textPosition](coregraphics/cgcontext/textposition.md)
- [selectFont(name:size:textEncoding:)](coregraphics/cgcontext/selectfont(name:size:textencoding:).md)
- [setCharacterSpacing(_:)](coregraphics/cgcontext/setcharacterspacing(_:).md)
- [setFont(_:)](coregraphics/cgcontext/setfont(_:).md)
- [setFontSize(_:)](coregraphics/cgcontext/setfontsize(_:).md)
- [setTextDrawingMode(_:)](coregraphics/cgcontext/settextdrawingmode(_:).md)
- [setAllowsFontSmoothing(_:)](coregraphics/cgcontext/setallowsfontsmoothing(_:).md)
- [setAllowsFontSubpixelQuantization(_:)](coregraphics/cgcontext/setallowsfontsubpixelquantization(_:).md)
- [setShouldSmoothFonts(_:)](coregraphics/cgcontext/setshouldsmoothfonts(_:).md)
- [setShouldSubpixelPositionFonts(_:)](coregraphics/cgcontext/setshouldsubpixelpositionfonts(_:).md)
- [setShouldSubpixelQuantizeFonts(_:)](coregraphics/cgcontext/setshouldsubpixelquantizefonts(_:).md)
- [showGlyphs(g:count:)](coregraphics/cgcontext/showglyphs(g:count:).md)
- [showGlyphs(_:at:)](coregraphics/cgcontext/showglyphs(_:at:).md)
- [showGlyphsAtPoint(x:y:glyphs:count:)](coregraphics/cgcontext/showglyphsatpoint(x:y:glyphs:count:).md)
