<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/Font/init(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI4FontVyACSo9CTFontRefacfc"
  },
  "title" : "init(_:)"
}
-->

# init(_:)

Creates a custom font from a platform font instance.

```
init(_ font: CTFont)
```

## Discussion

Initializing [`Font`](/documentation/SwiftUI/Font) with platform font instance
(<doc://com.apple.documentation/documentation/CoreText/CTFont-q6r>) can bridge SwiftUI
[`Font`](/documentation/SwiftUI/Font) with <doc://com.apple.documentation/documentation/AppKit/NSFont> or
<doc://com.apple.documentation/documentation/UIKit/UIFont>, both of which are
toll-free bridged to
<doc://com.apple.documentation/documentation/CoreText/CTFont-q6r>. For example:

```
// Use native Core Text API to create desired ctFont.
let ctFont = CTFontCreateUIFontForLanguage(.system, 12, nil)!

// Create SwiftUI Text with the CTFont instance.
let text = Text("Hello").font(Font(ctFont))
```

---

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)