title: How to determine maximum number of characters given a fixed width font and a maximum width in pixels
body: <p>Given a number of pixels (say: 300) and a Font (fixed type, fixed size, like Consolas), how could I determine the maximum number of characters that I could draw with <strong>GDI+</strong>?</p>
  
  <p>The text won't be written to a Label or such, but drawn using GDI+:</p>
  
  <pre><code>public void DrawString( string s, Font font, Brush brush, 
      RectangleF layoutRectangle, StringFormat format );
  </code></pre>
  
  <p>But I want to perform certain text operations before drawing, hence why I'd like to figure out the maximum number of chars I can safely output.</p>