How can I set the default font of an NSTextView component? I need to have an area in my app where users can make changes to a plain text file, and I'd like for the font to be a monospaced font.
Found it. This answer was close, but wouldn't do it - had to access the textStorage object of the NSTextView first:
[[myNSTextView textStorage] setFont:[NSFont fontWithName:@"Menlo" size:11]];
NSFont* font = <whatever>; [textView setFont: font];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With