4 ms·
Anyone have good examples of proportional width fonts that have coding focused changes, like well differentiated 0/O and I/l and or coding ligatures? I've been
by macrael 5y ago
Anyone have good examples of proportional width fonts that have coding focused changes, like well differentiated 0/O and I/l and or coding ligatures? I've been really happy just using Avenir for coding for the last 10 years or so, but I'd love something proportional that was a bit more coding aware.
rant: Fixed width fonts are an abomination invented b/c they were easier to program for display in early terminals and computers have long since been fast enough to eschew them forever.
- rami3l 5y ago
- Stratoscope 5y agoNice to meet another fan of proportional fonts! I find them so much more readable than monospaced. My current favorite is Trebuchet MS, or more specifically a version of it that I tweaked in FontForge and call Trebuchet++. Trebuchet MS ticks a lot of the boxes for me "as is". It doesn't have ligatures, but does have easily distinguished 0/O, I/l, etc. And it renders beautifully on the high-DPI monitors I use with the largish font sizes I prefer. I do most of my coding on a 24" 4K monitor, so it's just shy of 200 DPI, and I run it with 200% scaling on Windows and Linux. One thing I don't like in Trebuchet MS is the tilde. It is a scrawny little thing that is hard to distinguish from a hyphen. So I used FontForge to swap in a much better tilde. Then I had some fun with underscores. I don't like snake_case_names at all, but some coding standards mandate them. One problem with proportional fonts is that the underscore is much wider than the period, so you get this effect: snake_case.snake_case.snake_case If you look at the spacing between words here, "case.snake" is more tightly grouped than "snake_case" - the opposite of how it should be. I fixed this by adding a bit of space on each side of the period, and narrowing the space occupied by the underscore. At first I tried just making the underline itself shorter, but it was hard to tell from a period. So instead I kept most of the underline width and narrowed the character box instead. The underline tucks under the adjacent characters a bit, but it looks OK. The net effect is subtle, but for my eyes it makes snake_case.snake_case a little easier to read and understand. I have been meaning to find out if and how I could open source Trebuchet++ (since it's based on a Microsoft font), but in the meantime drop me a note if you would like a copy to try out - email is in my profile.