IDE Code Printout is Unusable

BrendaEM:
Why should it matter what the editor screen font size is?
I am printing, and/or outputting to a file.

You're printing to a .pdf file, not a text file. When you do that, it will create a .pdf file that looks just the same as the pages coming out of your printer would. So of course the font size matters. Haven't you noticed that if you change the font size in a file, the text size also changes when you print that file?

If you wanted the output as pure text, well the sketch already is pure text. Just open it in a text editor.

BrendaEM:
Further, my screen being at 2880x1620, that if I made my screen font small enough that it might be able to print at 12 point--the font on the screen would be unreadable.

I suspect this is the key. The Arduino IDE does automatic scaling of the IDE on high resolution monitors by default. So the font size in effect it way larger than 17.

Try this:

  • File > Preferences
  • Uncheck the box next to Interface scale > Automatic. Warning: this is going to make the Arduino IDE interface smaller.
  • Close all Arduino IDE windows.
  • Start the Arduino IDE
  • Try printing to a file again.

I'm guessing you'll find the printed file is now as expected. I don't own a high resolution monitor so I can't say whether this is a normal behavior for auto scaling applications or whether the Arduino IDE should be outputting the file at 100% interface scale, rather than the 200% or whatever it's automatically choosing for your display.

BrendaEM:
This is why screen font sizes and print font sizes are otherwise not linked.

Wut? They sure are in my universe. I've never seen an application that allows you to set a different font size for printing. You can sometimes change print scale.