5 ms·
There are instances where font matters, and I go back to TurboC on my 8086 and Fortran 'scards' on a VMS mainframe + terminal, so I'm not a whiny mod-crazy hips
by iheartpotatoes 8y ago
There are instances where font matters, and I go back to TurboC on my 8086 and Fortran 'scards' on a VMS mainframe + terminal, so I'm not a whiny mod-crazy hipster.
> Fonts Creating Bugs:
Some fonts are more prone to errors. Lower case L vs number one, zero vs. capital O, braces vs parens, lowercase g vs 9. Go look at old Unix fixed fonts, and even courier and you can see how hard it is to distinguish. (Unix '10x7' was my favorite until horz resolutions crossed the 1600px.)
> Readabilty vs. Coding Style causing (literal) Headaches:
Staring at code 10+ hours a day, eyes fatigue. Some fonts are noisier than others, some fonts read faster than others, some fonts have more space than others.
And, if the coding style of the person you are reading does not use spaces between '=' or '()', or ample newlines, Courier can be a very taxing font due to all the serifs.
Lucida Mono provides a nice way out of this, but not all systems have it. Consolas solved the problem for a very long time.
> Ligature Bling
The addition of ligatures is mostly bling. I tried Firas cuz the => glyphs were nifty, but ultimately a big fat triple equals looks worse than '===' and I'd rather not waste time tweaking my goddamn font!
> Proportional
What kind of savage codes with a proportional font?
> Portability
I switched to Consolas because I can use it on Vi on macOS, Win, and *nix, and it saves my eyes from dense programming style.
- zamalek 8y ago> eyes fatigue. Not only that, but it might as well look nice if you're staring at it for 10+ hours.
- stkdump 8y ago> What kind of savage codes with a proportional font? I did for some time. I only switched back because our coding standard limits the length of a line and that is hard to check with a proportional font. I honestly don't get why source code needs a fixed character grid. My prefered code formatting doesn't require lining up things using spaces in the middle of the line. If things need to be lined up, then I put them in the beginning of the line with the apropriate indentation. This way anyone can choose any font they like and make use of the increased readability of proportional fonts.
- kakarot 8y agoI honestly don't get why source code needs a fixed character grid. > Alignment of blocks and assignments. It's that simple. The benefits from the increased legibility and clarity can be quite tangible. Code that is the same looks the same, and it's easier to scan for anomalies.
- Stratoscope 8y ago> 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.