<!--
{
  "availability" : [
    "macOS: 10.0.0 - 10.11.0"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSLayoutManager/intAttribute(_:forGlyphAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSLayoutManager(im)intAttribute:forGlyphAtIndex:"
  },
  "title" : "intAttribute(_:forGlyphAt:)"
}
-->

# intAttribute(_:forGlyphAt:)

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

```
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

The value of the attribute identified by `attributeTag` and `glyphIndex`.

## 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:)`](/documentation/AppKit/NSLayoutManager/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.

---

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)