---
title: CGFontRetain
framework: coregraphics
role: symbol
role_heading: Function
path: coregraphics/cgfontretain
---

# CGFontRetain

Increments the retain count of a font.

## Declaration

```occ
extern CGFontRefCGFontRetain(CGFontRef font);
```

## Parameters

- `font`: The font to retain.

## Return Value

Return Value The same font you specified in the font parameter.

## Discussion

Discussion This function is equivalent to CFRetain, except that it does not cause an error if the font parameter is NULL.

## See Also

### Retaining and Releasing a CGFont Object

- [CGFontRelease](coregraphics/cgfontrelease.md)
