As simple as it seems, I simply CANNOT find ANY way to do that (setFont:
is not working) :
NSTextView
NSFont
.Hint : (Pretty obvious, but whatever... ) IF the user adds any text, the new text is supposed to 'inherit' the exact same style...
I don't know what you're doing wrong, I am able to change the NSTextView's font in my own project. Are you sure you're setting the font AFTER the text view has been loaded? Check if the text view is loaded using NSLog.
You have to set font to textStorage, not to TextView
[[textView textStorage] setFont:[NSFont fontWithName:@"Menlo" size:12]];
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