title: Different Text Rendering Methods Don't Produce The One I Want
body: <p>I am looking for a text rendering method where a graphics object is initialized from a bitmap, text is drawn on it and the text looks like the first line in the attached image.</p>
  
  <p>Can someone please explain a method that will do this? I'm not fully understanding why none of the following methods can reproduce it:</p>
  
  <p>Font in test is: Segoe UI, 8.25pt</p>
  
  <pre><code>protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
  {
      base.OnPaint(e);
  
      //drawing the string with the Graphics object the form gives us
      e.Graphics.DrawString("1. This is a test using DrawString. " + e.Graphics.TextRenderingHint.ToString(), 
                            base.Font, Brushes.Black, new Point(10, 10));
  
      //width used for all images
      const int width = 300;
  
      //drawing the string with Graphics objects initialized from bitmaps
      Bitmap bmp = new Bitmap(width, 20);
      using (Graphics gfx = Graphics.FromImage(bmp))
      {
          gfx.PageUnit = GraphicsUnit.Pixel;
          gfx.SmoothingMode = SmoothingMode.HighQuality;
          gfx.DrawString("2. This is a test using DrawString. " + gfx.TextRenderingHint.ToString(), 
                         base.Font, Brushes.Black, Point.Empty);
      }
      e.Graphics.DrawImage(bmp, new Point(10, 30));
  
      bmp.Dispose();
      bmp = new Bitmap(width, 20);
  
      using (Graphics gfx = Graphics.FromImage(bmp))
      {
          gfx.PageUnit = GraphicsUnit.Pixel;
          gfx.SmoothingMode = SmoothingMode.HighQuality;
          gfx.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAliasGridFit;
          gfx.DrawString("3. This is a test using DrawString. " + gfx.TextRenderingHint.ToString(), 
                         base.Font, Brushes.Black, Point.Empty);
      }
  
      e.Graphics.DrawImage(bmp, new Point(10, 50));
  
      bmp.Dispose();
      bmp = new Bitmap(width, 20);
  
      using (Graphics gfx = Graphics.FromImage(bmp))
      {
          gfx.PageUnit = GraphicsUnit.Pixel;
          gfx.SmoothingMode = SmoothingMode.HighQuality;
          gfx.TextRenderingHint = System.Drawing.Text.TextRenderingHint.AntiAlias;
          gfx.DrawString("4. This is a test using DrawString. " + gfx.TextRenderingHint.ToString(), 
                         base.Font, Brushes.Black, Point.Empty);
      }
  
      e.Graphics.DrawImage(bmp, new Point(10, 70));
  
      bmp.Dispose();
      bmp = new Bitmap(width, 20);
  
      using (Graphics gfx = Graphics.FromImage(bmp))
      {
          gfx.PageUnit = GraphicsUnit.Pixel;
          gfx.SmoothingMode = SmoothingMode.HighQuality;
          gfx.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
          gfx.DrawString("5. This is a test using DrawString. " + gfx.TextRenderingHint.ToString(),
                         base.Font, Brushes.Black, Point.Empty);
      }
  
      e.Graphics.DrawImage(bmp, new Point(10, 90));
  
      bmp.Dispose();
      bmp = new Bitmap(width, 20);
  
      using (Graphics gfx = Graphics.FromImage(bmp))
      {
          gfx.PageUnit = GraphicsUnit.Pixel;
          gfx.SmoothingMode = SmoothingMode.HighQuality;
          using (GraphicsPath path = new GraphicsPath())
          {
              path.AddString("6. This is a test using GraphicsPath. " + gfx.TextRenderingHint.ToString(), 
                             base.Font.FontFamily, (int)base.Font.Style, 
                             base.Font.Size, Point.Empty, StringFormat.GenericDefault);
  
              gfx.FillPath(Brushes.Black, path);
          }
      }
  
      e.Graphics.DrawImage(bmp, new Point(10, 110));
  
      bmp.Dispose();
      bmp = new Bitmap(width, 20);
  
      using (Graphics gfx = Graphics.FromImage(bmp))
      {
          gfx.PageUnit = GraphicsUnit.Pixel;
          gfx.SmoothingMode = SmoothingMode.HighQuality;
          gfx.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;
          using (GraphicsPath path = new GraphicsPath())
          {
              path.AddString("7. This is a test using GraphicsPath. " + gfx.TextRenderingHint.ToString(),
                             base.Font.FontFamily, (int)base.Font.Style,
                             base.Font.Size, Point.Empty, StringFormat.GenericDefault);
  
              gfx.FillPath(Brushes.Black, path);
          }
      }
  
      e.Graphics.DrawImage(bmp, new Point(10, 130));
  
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/kipXw.png" alt="Form1_v2"></p>