<!--
{
  "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/kCTUnderlineStyleAttributeName",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Core Text"
    ],
    "preciseIdentifier" : "c:@kCTUnderlineStyleAttributeName"
  },
  "title" : "kCTUnderlineStyleAttributeName"
}
-->

# kCTUnderlineStyleAttributeName

The style of underlining, to be applied at render time, for the text to which this attribute applies.

```
let kCTUnderlineStyleAttributeName: CFString
```

## Discussion

Value must be a <doc://com.apple.documentation/documentation/CoreFoundation/CFNumber> object. Default is [`kCTUnderlineStyleNone`](/documentation/CoreText/CTUnderlineStyle/kCTUnderlineStyleNone). Set a value of something other than [`kCTUnderlineStyleNone`](/documentation/CoreText/CTUnderlineStyle/kCTUnderlineStyleNone) to draw an underline. In addition, the constants listed in  [`CTUnderlineStyleModifiers`](/documentation/CoreText/CTUnderlineStyleModifiers) can be used to modify the look of the underline. The underline color is determined by the text’s foreground color.

---

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)