---
title: "screenFont(with:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsfont/screenfont(with:)"
---

# screenFont(with:)

Returns a bitmapped screen font, when sent to a font object representing a scalable PostScript font, with the specified rendering mode, matching the receiver in typeface and matrix (or size), or nil if such a font can’t be found.

## Declaration

```swift
func screenFont(with renderingMode: NSFontRenderingMode) -> NSFont
```

## Discussion

Discussion For valid rendering modes, see NSFontRenderingMode. Screen fonts are for direct use with the window server only. Never use them with Application Kit objects, such as in setFont: methods. Internally, the Application Kit automatically uses the corresponding screen font for a font object as long as the view is not rotated or scaled.

## See Also

### Related Documentation

- [screen](appkit/nsfont/screen.md)
- [printer](appkit/nsfont/printer.md)

### Instance Methods

- [advancement(forGlyph:)](appkit/nsfont/advancement(forglyph:).md)
- [boundingRect(forGlyph:)](appkit/nsfont/boundingrect(forglyph:).md)
- [getAdvancements(_:forGlyphs:count:)](appkit/nsfont/getadvancements(_:forglyphs:count:).md)
- [getAdvancements(_:forPackedGlyphs:length:)](appkit/nsfont/getadvancements(_:forpackedglyphs:length:).md)
- [getBoundingRects(_:forGlyphs:count:)](appkit/nsfont/getboundingrects(_:forglyphs:count:).md)
- [glyph(withName:)](appkit/nsfont/glyph(withname:).md)
- [withSize(_:)](appkit/nsfont/withsize(_:).md)
