---
title: "intAttribute(_:forGlyphAt:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nslayoutmanager/intattribute(_:forglyphat:)"
---

# intAttribute(_:forGlyphAt:)

Returns the value of the attribute identified by the given attribute tag for the glyph at the given index.

## Declaration

```swift
func intAttribute(_ attributeTag: Int, forGlyphAt glyphIndex: Int) -> Int
```

## Parameters

- `attributeTag`: The attribute whose value is returned.
- `glyphIndex`: Index of the glyph whose attribute value is returned.

## Return Value

Return Value The value of the attribute identified by attributeTag and glyphIndex.

## Discussion

Discussion Subclasses that define their own custom attributes must override this method to access their own storage for the attribute values. Nonnegative tags are reserved by Apple; you can define your own attributes with negative tags and set values using setIntAttribute(_:value:forGlyphAt:). If noncontiguous layout is not enabled, this method causes generation of all glyphs up to and including glyphIndex. This method is primarily for the use of the glyph generator and typesetter.

## See Also

### Methods

- [showCGGlyphs(_:positions:count:font:matrix:attributes:in:)](appkit/nslayoutmanager/showcgglyphs(_:positions:count:font:matrix:attributes:in:).md)
- [invalidateGlyphs(onLayoutInvalidationForGlyphRange:)](appkit/nslayoutmanager/invalidateglyphs(onlayoutinvalidationforglyphrange:).md)
- [invalidateLayout(forCharacterRange:isSoft:actualCharacterRange:)](appkit/nslayoutmanager/invalidatelayout(forcharacterrange:issoft:actualcharacterrange:).md)
- [textStorage(_:edited:range:changeInLength:invalidatedRange:)](appkit/nslayoutmanager/textstorage(_:edited:range:changeinlength:invalidatedrange:).md)
- [insertGlyph(_:atGlyphIndex:characterIndex:)](appkit/nslayoutmanager/insertglyph(_:atglyphindex:characterindex:).md)
- [insertGlyphs(_:length:forStartingGlyphAt:characterIndex:)](appkit/nslayoutmanager/insertglyphs(_:length:forstartingglyphat:characterindex:).md)
- [glyph(at:)](appkit/nslayoutmanager/glyph(at:).md)
- [glyph(at:isValidIndex:)](appkit/nslayoutmanager/glyph(at:isvalidindex:).md)
- [replaceGlyph(at:withGlyph:)](appkit/nslayoutmanager/replaceglyph(at:withglyph:).md)
- [getGlyphs(_:range:)](appkit/nslayoutmanager/getglyphs(_:range:).md)
- [getGlyphs(in:glyphs:characterIndexes:glyphInscriptions:elasticBits:)](appkit/nslayoutmanager/getglyphs(in:glyphs:characterindexes:glyphinscriptions:elasticbits:).md)
- [getGlyphs(in:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:)](appkit/nslayoutmanager/getglyphs(in:glyphs:characterindexes:glyphinscriptions:elasticbits:bidilevels:).md)
- [deleteGlyphs(in:)](appkit/nslayoutmanager/deleteglyphs(in:).md)
- [setCharacterIndex(_:forGlyphAt:)](appkit/nslayoutmanager/setcharacterindex(_:forglyphat:).md)
- [setIntAttribute(_:value:forGlyphAt:)](appkit/nslayoutmanager/setintattribute(_:value:forglyphat:).md)
