<!--
{
  "availability" : [
    "iOS: 4.1.0 - 18.0.0",
    "iPadOS: 4.1.0 - 18.0.0",
    "macCatalyst: 13.1.0 - 18.0.0",
    "macOS: 10.8.0 - 15.0.0",
    "tvOS: 9.0.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 2.0.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "CoreText",
  "identifier" : "/documentation/CoreText/CTFontManagerRegisterGraphicsFont(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Text"
    ],
    "preciseIdentifier" : "c:@F@CTFontManagerRegisterGraphicsFont"
  },
  "title" : "CTFontManagerRegisterGraphicsFont(_:_:)"
}
-->

# CTFontManagerRegisterGraphicsFont(_:_:)

Registers the specified graphics font with the font manager.

```
func CTFontManagerRegisterGraphicsFont(_ font: CGFont, _ error: UnsafeMutablePointer<Unmanaged<CFError>?>?) -> Bool
```

## Parameters

`font`

The graphics font to be registered.

`error`

Returns by indirection an error object in the case of failed registration.

## Return Value

`true` if registration of the font was successful, otherwise `false`.

## Discussion

Registered fonts are discoverable through font descriptor matching. Any attempt to register a font that is either already registered or contains the same Postscript of an already registered font will fail. This behavior is useful for fonts that may be embedded in documents or constructed in memory. A graphics font is obtained by calling <doc://com.apple.documentation/documentation/CoreGraphics/CGFont/init(_:)-9aour>. Fonts that are backed by files should be registered using [`CTFontManagerRegisterFontsForURL(_:_:_:)`](/documentation/CoreText/CTFontManagerRegisterFontsForURL(_:_:_:)).

## See Also

[`CTFontManagerUnregisterGraphicsFont`](/documentation/CoreText/CTFontManagerUnregisterGraphicsFont(_:_:))

Unregisters the specified graphics font with the font manager.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)