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

# CTFontDescriptorCreateWithNameAndSize(_:_:)

Creates a new font descriptor with the provided PostScript name and size.

```
func CTFontDescriptorCreateWithNameAndSize(_ name: CFString, _ size: CGFloat) -> CTFontDescriptor
```

## Parameters

`name`

The PostScript name to be used for the font descriptor as a <doc://com.apple.documentation/documentation/CoreFoundation/CFString> object.

`size`

The point size. If `0.0`, the font size attribute ([`kCTFontSizeAttribute`](/documentation/CoreText/kCTFontSizeAttribute)) is omitted from the returned font descriptor.

## Return Value

A new font descriptor reference with the given PostScript name and point size.

---

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)