---
title: strokeWidth
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsattributedstring/key/strokewidth
---

# strokeWidth

The width of the stroke.

## Declaration

```swift
static let strokeWidth: NSAttributedString.Key
```

## Discussion

Discussion The value of this attribute is an NSNumber object containing a floating-point value. This value represents the amount to change the stroke width and is specified as a percentage of the font point size. Specify 0 (the default) for no additional changes. Specify positive values to change the stroke width alone. Specify negative values to stroke and fill the text. For example, a typical value for outlined text would be 3.0.

## See Also

### Getting rendering attribute keys

- [backgroundColor](foundation/nsattributedstring/key/backgroundcolor.md)
- [baselineOffset](foundation/nsattributedstring/key/baselineoffset.md)
- [font](foundation/nsattributedstring/key/font.md)
- [foregroundColor](foundation/nsattributedstring/key/foregroundcolor.md)
- [glyphInfo](foundation/nsattributedstring/key/glyphinfo.md)
- [kern](foundation/nsattributedstring/key/kern.md)
- [ligature](foundation/nsattributedstring/key/ligature.md)
- [paragraphStyle](foundation/nsattributedstring/key/paragraphstyle.md)
- [strikethroughColor](foundation/nsattributedstring/key/strikethroughcolor.md)
- [strikethroughStyle](foundation/nsattributedstring/key/strikethroughstyle.md)
- [strokeColor](foundation/nsattributedstring/key/strokecolor.md)
- [superscript](foundation/nsattributedstring/key/superscript.md)
- [tracking](foundation/nsattributedstring/key/tracking.md)
- [underlineColor](foundation/nsattributedstring/key/underlinecolor.md)
- [underlineStyle](foundation/nsattributedstring/key/underlinestyle.md)
