---
title: xHeight
framework: coregraphics
role: symbol
role_heading: Instance Property
path: coregraphics/cgfont/xheight
---

# xHeight

Returns the x-height of a font.

## Declaration

```swift
var xHeight: Int32 { get }
```

## Discussion

Discussion The x-height is the distance above the baseline of the top of flat, non-ascending lowercase letters (such as x) of glyphs in a font. The value is specified in glyph space units.

## See Also

### Examining Font Metrics

- [ascent](coregraphics/cgfont/ascent.md)
- [capHeight](coregraphics/cgfont/capheight.md)
- [descent](coregraphics/cgfont/descent.md)
- [fontBBox](coregraphics/cgfont/fontbbox.md)
- [italicAngle](coregraphics/cgfont/italicangle.md)
- [leading](coregraphics/cgfont/leading.md)
- [stemV](coregraphics/cgfont/stemv.md)
- [unitsPerEm](coregraphics/cgfont/unitsperem.md)
