>
What kind of savage codes with a proportional font?I have, for more than a decade. Why do you call me a savage? ;-)
I know you're kidding, of course, but now you owe me (and yourself) a favor.
Go to the linked test page. Pick a color theme you like, change the language if you want and leave the other settings alone. Now do some reading and editing in the source code box.
Don't worry about whether you like or dislike this particular font, Input Sans. I'm not much of a fan of it [1], but it will serve to make the point.
Does the code look OK and editing it works OK?
Now switch the font to Input Mono and take another look. Switch back and forth between Sans and Mono a few times to compare.
(Skip Input Serif for this comparison as it's a rather different style of font. The cursor keys are handy here: click on Input Sans and then use the up arrow to go directly to Input Mono, and down arrow to go back to Input Sans.)
To my eyes the code looks pretty similar in the Sans and Mono variants, how about you?
But Input Sans is a proportional font, not monospaced!
As stkdump noted, proportional fonts only break down if you use column alignment. Take this line in the Python code for example:
vanillaView = ShowMouseCoordinatesTextBox((20, -30, -20, 22), "", alignment="left", sizeStyle="mini")
If you want to get that down to 80 characters, you might do it like this in a column aligned style:
vanillaView = ShowMouseCoordinatesTextBox((20, -30, -20, 22), "",
alignment="left",
sizeStyle="mini")
The parameters will line up only if you're using a monospaced font. In a proportional font the last two parameters will appear to be shifted to the left.
But you don't have to do it that way! This kind of column alignment has many disadvantages even in a monospaced font. (What if you rename the function or output variable?) Like stkdump, I would use indentation here:
vanillaView = ShowMouseCoordinatesTextBox(
(20, -30, -20, 22), "", alignment="left", sizeStyle="mini"
)
Now you don't have to re-align if you change those names, and the code will be perfectly readable in any font, proportional or monospaced.
Don't get me wrong, I'm not trying to persuade you to start using proportional fonts. I am hoping to persuade you and other developers to be more tolerant of those of us who like proportional fonts, and to avoid column aligned coding styles regardless of the font you prefer. Fair enough?
[1] My favorite coding font right now is Trebuchet MS. It renders beautifully on high-DPI displays, much nicer to my eyes than Input Sans, and it has easy-to-distinguish glyphs for the common mixups like Il|. It does have a wimpy tilde, so I used a font editor to copy in a better tilde from another font.