Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy do multiple font sizes display inside Plain TextBox?
    text
    copied!<p>This is not a question about how to change the font size. Rather, why is the size of my font changing by itself as I type (or paste) when it's inside a plain <code>TextBox</code> control which, as you should know, only supports one color, one font, and one font size at any given time.</p> <p>My code:</p> <pre><code>using(FontDialog d = new FontDialog()) { // The usual properties... if(d.ShowDialog() == DialogResult.OK) { textbox1.Font = d.Font; } } </code></pre> <p>The font is set at 8pt. If I paste plain text into it, the top line will be 9 to 10pt while the bottom line is noticeably smaller (about 8 pt).</p> <p>It doesn't matter which font, font style, or font size I choose; this keeps happening!</p> <p><img src="https://i.stack.imgur.com/LJup5.png" alt="enter image description here"></p> <h1>Update</h1> <p>Thanks for all your help thus far.To answer your recent questions below:</p> <p>My app is targetting .NET 4.5.</p> <p>There's no mix up in the code, since I was able to reproduce this problem in a new Windows Forms project with nothing but a Form, a TextBox and a Button that calls the FontDialog.</p> <p>To answer the question about my Video drivers, I did require support for an app I purchased a few weeks ago and they told me to run DXDiag, they got back to me saying my Video Card driver is out of date, however I didn't think it was because I always check every few months. I then went to the manufacturer's website and it said that I already have the latest drivers installed for my system.</p> <p>Windows Update also says there are no new available updates. I'll check for a new version of drivers again, though.</p> <hr/> <p>I also did a test in a new blank project where I display the font being used by the TextBox <em>before</em> calling FontDialog.ShowDialog(), and after it has been shown and after the new font has been set and everything matches - yet there is still the issues after changing font/font size inside the textbox.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload