Font size in NSTextView smaller than expected

Help please,

I have an app where I have implemented an xib view/scroll view/textView to allow a user to enter text that they can either save to file or print out a hard copy. My problem is that whilst I have set the font size to say Calibri 11 for the printed hard copy or the data saved to disc the font size on the xib textView input (Calibri 11) is much smaller and hence makes it difficult for a user to be sure of the correct text layout.


I am sure I am not the first person to have this problem but I cannot find a solution. There doesnt seem to be a way of pasting a png file of a screenshot of the textView into this post.



Thanks for your help.

Edmund Sikora

Likely you could subclass textView, aka :


class TextViewWithPrint: NSTextView {
   
    override func drawRect(dirtyRect: NSRect) {
        super.drawRect(dirtyRect)
        
        if NSGraphicsContext.currentContextDrawingToScreen() {
               // Increase police size here
          } else {
               // keep as it is        
          }
    }
Font size in NSTextView smaller than expected
 
 
Q