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

# boundingRect(forCGGlyph:)

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

## Declaration

```swift
func boundingRect(forCGGlyph glyph: CGGlyph) -> 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

### Getting Bounding Rectangles

- [boundingRectForFont](appkit/nsfont/boundingrectforfont.md)
- [getBoundingRects(_:forCGGlyphs:count:)](appkit/nsfont/getboundingrects(_:forcgglyphs:count:).md)
