title: How can I resize an NSTextField to fit the text that it holds?
body: <p>I'm using an <code>NSTextField</code> to display lines of text that will be printed on a printer with a variable paper size (the printer prints to a spool, which is cut to the appropriate length when the job is done).</p>
  
  <p>I can generate the text no problem, but I need to know how big to make the <code>NSTextField</code> (vertically) so that it exactly contains all of the lines of text. Is there an easy way of going about this?</p>
  
  <p>The text is prepared as an <code>NSAttributedString</code>, and the lines are all of a fixed width (no wrapping), if that helps.</p>