<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSFont/setUser(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSFont(cm)setUserFont:"
  },
  "title" : "setUser(_:)"
}
-->

# setUser(_:)

Sets the font used by default for documents and other text under the user’s control to the specified font.

```
class func setUser(_ font: NSFont?)
```

## Discussion

Specifying `aFont` as `nil` causes the default to be removed from the application domain.

## See Also

[`+  userFontOfSize:`](/documentation/AppKit/NSFont/userFont(ofSize:))

Returns the font used by default for documents and other text under the user’s control (that is, text whose font the user can normally change), in the specified 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)