---
title: "boundingRect(forGlyph:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsfont/boundingrect(forglyph:)"
---

# boundingRect(forGlyph:)

Returns the bounding rectangle for the specified glyph, scaled to the receiver’s size.

## Declaration

```swift
func boundingRect(forGlyph glyph: NSGlyph) -> NSRect
```

## Discussion

Discussion Japanese fonts encoded with the scheme “EUC12-NJE-CFEncoding” do not have individual metrics or bounding boxes available for the glyphs above 127. For those glyphs, this method returns the bounding rectangle for the font instead.

## See Also

### Related Documentation

- [boundingRectForFont](appkit/nsfont/boundingrectforfont.md)

### Instance Methods

- [advancement(forGlyph:)](appkit/nsfont/advancement(forglyph:).md)
- [getAdvancements(_:forGlyphs:count:)](appkit/nsfont/getadvancements(_:forglyphs:count:).md)
- [getAdvancements(_:forPackedGlyphs:length:)](appkit/nsfont/getadvancements(_:forpackedglyphs:length:).md)
- [getBoundingRects(_:forGlyphs:count:)](appkit/nsfont/getboundingrects(_:forglyphs:count:).md)
- [glyph(withName:)](appkit/nsfont/glyph(withname:).md)
- [screenFont(with:)](appkit/nsfont/screenfont(with:).md)
- [withSize(_:)](appkit/nsfont/withsize(_:).md)
