---
title: "availableFontNames(with:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsfontmanager/availablefontnames(with:)"
---

# availableFontNames(with:)

Returns the names of the fonts available in the system whose traits are described exactly by the given font trait mask (not the NSFont objects themselves).

## Declaration

```swift
func availableFontNames(with someTraits: NSFontTraitMask) -> [String]?
```

## Parameters

- `someTraits`: The font traits for which to return font names. You specify the desired traits by combining the font trait mask values described in Constants using the C bitwise OR operator.

## Return Value

Return Value The names of the corresponding fonts.

## Discussion

Discussion These fonts are in various system font directories. If someTraits is 0, this method returns all fonts that are neither italic nor bold. This result is the same one you’d get if fontTraitMask were NSUnitalicFontMask | NSUnboldFontMask.

## See Also

### Getting Available Fonts

- [availableFonts](appkit/nsfontmanager/availablefonts.md)
- [availableFontFamilies](appkit/nsfontmanager/availablefontfamilies.md)
- [availableMembers(ofFontFamily:)](appkit/nsfontmanager/availablemembers(offontfamily:).md)
