title: Why TextRenderer adds margins while measuring text?
body: <p>Because of lack of Graphics object in certain places in my application, I decided to use TextRenderer class. What is quite surprising though is that it adds a lot of margins to measured text. For example:</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e) {
  
      using (var g = this.CreateGraphics()) {
  
          Font font = new Font("Calibri", 20.0f, GraphicsUnit.Pixel);
          Size size = TextRenderer.MeasureText("Ala ma kota", font);
  
          g.DrawRectangle(Pens.Red, new Rectangle(new Point(10, 10), size));
          TextRenderer.DrawText(g, "Ala ma kota", font, new Point(10, 10), Color.Black);
      }
  }
  </code></pre>
  
  <p>Gives the following result:</p>
  
  <p><img src="https://i.stack.imgur.com/i3byh.png" alt="Text with margins"></p>
  
  <p>Why does it do so? Is there a way to force it to get the real text size? (and of course draw it in the same rectangle it returns)</p>