title: NSTextView changing Insertion Point (Caret) Cursor size when there is no string
body: <p>I am creating a <code>NSTextView</code>, and I want to change the size of the insertion point when the NSTextView is empty.</p>
  
  <p>It appears that the caret cursor (I-Beam / IBeam cursor) size is based off of the current font size attribute on the <code>attributedString</code> property of the <code>NSTextView</code>.</p>
  
  <p>The problem is that because the <code>NSTextView</code> has an empty <code>attributedString</code>, there can be no attributes on the string.  This means that I can't apply a font size.</p>
  
  <p>However, I can change the <code>typingAttributes</code> to have the fontSize be correct-- but the Insertion Point Cursor does not update size until I start typing</p>
  
  <p>See these screenshots:
  Notice here the textview on the right has a small insertion point cursor:<br>
  <a href="https://i.stack.imgur.com/SJhB8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SJhB8.png" alt="enter image description here"></a></p>
  
  <p>I start typing, and it updates in size:<br>
  <a href="https://i.stack.imgur.com/YD0FT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YD0FT.png" alt="enter image description here"></a></p>
  
  <p>So my question is, is there a property that I need to set on the <code>NSTextView</code> when I initialize it, in order to get the initial Insertion Point Cursor the correct Size?  (I want it to match the <code>typingAttributes</code> font)</p>
  
  <p>EDIT:
  @Mark Bessey brought up a good question-- what is the order that I'm setting the typing attributes:</p>
  
  <pre><code>  [_textEditor setTypingAttributes:typingAttributes];
    [_textEditor setDelegate:self];
  
    [view addSubview:_textEditor];
    [self updateInsertionPointColor];
  
    [[view window] makeFirstResponder:_textEditor];
    [view setNeedsDisplay:YES];
  </code></pre>