---
title: "setHardInvalidation(_:forGlyphRange:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsatstypesetter/sethardinvalidation(_:forglyphrange:)"
---

# setHardInvalidation(_:forGlyphRange:)

Sets a Boolean value that determines whether the layout manager invalidates the specified portion of the glyph cache.

## Declaration

```swift
func setHardInvalidation(_ flag: Bool, forGlyphRange glyphRange: NSRange)
```

## See Also

### Laying Out Glyphs

- [boundingBox(forControlGlyphAt:for:proposedLineFragment:glyphPosition:characterIndex:)](appkit/nsatstypesetter/boundingbox(forcontrolglyphat:for:proposedlinefragment:glyphposition:characterindex:).md)
- [getLineFragmentRect(_:usedRect:forParagraphSeparatorGlyphRange:atProposedOrigin:)](appkit/nsatstypesetter/getlinefragmentrect(_:usedrect:forparagraphseparatorglyphrange:atproposedorigin:).md)
- [hyphenCharacter(forGlyphAt:)](appkit/nsatstypesetter/hyphencharacter(forglyphat:).md)
- [hyphenationFactor(forGlyphAt:)](appkit/nsatstypesetter/hyphenationfactor(forglyphat:).md)
- [shouldBreakLine(byHyphenatingBeforeCharacterAt:)](appkit/nsatstypesetter/shouldbreakline(byhyphenatingbeforecharacterat:).md)
- [shouldBreakLine(byWordBeforeCharacterAt:)](appkit/nsatstypesetter/shouldbreakline(bywordbeforecharacterat:).md)
- [willSetLineFragmentRect(_:forGlyphRange:usedRect:baselineOffset:)](appkit/nsatstypesetter/willsetlinefragmentrect(_:forglyphrange:usedrect:baselineoffset:).md)
