Windows – Why does Notepad “randomly” make pasted text a smaller font size

notepadwindows 7

Sometimes when I copy and paste text into Notepad, it will paste the text in the default Notepad font and size, however, the latter half of the pasted line will be multiple font sizes smaller. I'm stumped as to why this is happening.

I wondered if it was perhaps some type of hidden formatting that was being copied into Notepad, but I believe that Notepad strips the formatting. I've subsequently taken the same text and tried copy and pasting it into URL bars and CMD prompts to strip any potential formatting (even though it was plaintext copied from web), and then re-pasted into Notepad, but it still leaves this phenomenon.

Additionally, when resizing the Notepad window, it will change what portion of the line is default sized and downsized, as seen in the screenshot posted below.

The three windows are actually the same Notepad window, each with a different resizing and the resulting text resizing.

enter image description here

Best Answer

I've had the same issues with Notepad. Loading the file and analyzing it's contents in binary showed the reason: the line which starts with small font letters contains the "EF BB BF" Byte order mark (see https://en.wikipedia.org/wiki/Byte_order_mark).

What to do: somehow this mark is preserved even on saving the file. Some editing will cause Notepad to recognize the Unicode and tell you that it will be lost if you save the text. You can also go to the very start and delete the invisible "character" by pressing the "Delete" key. (The font will get big again in an instant.)

How this happened (in my case): I was creating text files with Unicode markers and later on the text-lines were sorted and saved again. The byte order mark became part of a line of text that was put at the end of the file (invisible mark screwed up the sort order) and in the middle of the text this mark just causes this effect.