---
title: "CTFontGetAscent(_:)"
framework: coretext
role: symbol
role_heading: Function
path: "coretext/ctfontgetascent(_:)"
---

# CTFontGetAscent(_:)

Returns the scaled font-ascent metric of the given font.

## Declaration

```swift
func CTFontGetAscent(_ font: CTFont) -> CGFloat
```

## Parameters

- `font`: The font reference.

## Return Value

Return Value The font-ascent metric scaled according to the point size and matrix of the font reference.

## See Also

### Getting Font Metrics

- [CTFontGetDescent(_:)](coretext/ctfontgetdescent(_:).md)
- [CTFontGetLeading(_:)](coretext/ctfontgetleading(_:).md)
- [CTFontGetUnitsPerEm(_:)](coretext/ctfontgetunitsperem(_:).md)
- [CTFontGetGlyphCount(_:)](coretext/ctfontgetglyphcount(_:).md)
- [CTFontGetBoundingBox(_:)](coretext/ctfontgetboundingbox(_:).md)
- [CTFontGetUnderlinePosition(_:)](coretext/ctfontgetunderlineposition(_:).md)
- [CTFontGetUnderlineThickness(_:)](coretext/ctfontgetunderlinethickness(_:).md)
- [CTFontGetSlantAngle(_:)](coretext/ctfontgetslantangle(_:).md)
- [CTFontGetCapHeight(_:)](coretext/ctfontgetcapheight(_:).md)
- [CTFontGetXHeight(_:)](coretext/ctfontgetxheight(_:).md)
