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

# setAllowsFontSubpixelQuantization(_:)

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

## Declaration

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

## Parameters

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

## Discussion

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(_:) 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)
- [setAllowsFontSubpixelPositioning(_:)](coregraphics/cgcontext/setallowsfontsubpixelpositioning(_:).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)
