News for hackers. Stuff that matters.
Re:Lesser Known Coding Fonts by petters on Sunday October 20, 2019 @03:22AM (#21302692)
There should be more variable-width coding fonts.
Re:Lesser Known Coding Fonts by mbrock on Sunday October 20, 2019 @05:16AM (#21303055)
The latest release of Iosevka has a "quasi-proportional" variant called Iosevka Aile which I really, really like.

Here's a 3200x1800 screenshot with some code in Emacs.

https://i.imgur.com/LdzBmpx.png

The kerning is not as tight as in a real proportional font. It's a bit more spacious and regular so that fixed width tabular layouts still look relatively decent.

Re:Lesser Known Coding Fonts by oneeyedpigeon on Sunday October 20, 2019 @05:45AM (#21303161)
The original image might’ve been 3200x1800 but it sure ain’t on imgur, unless I’m missing an obvious ‘view raw/original image’ option...
Re:Lesser Known Coding Fonts by mbrock on Sunday October 20, 2019 @06:42AM (#21303346)
Uhhh sorry I don’t understand imgur. I think there’s a way.

Oh it seems that the mobile imgur site is totally nerfed. Sorry. Is there a better free image host?

Re:Lesser Known Coding Fonts by oneeyedpigeon on Sunday October 20, 2019 @06:50AM (#21303369)
Ah, no worries - I’ll take a look on desktop in a minute. Better free image host? I guess github pages is a less-friendly alternative.
Re:Lesser Known Coding Fonts by jwilk on Sunday October 20, 2019 @06:46AM (#21303355)
Right-click the image, and choose "View image". Works at least in Firefox.
Re:Lesser Known Coding Fonts by oneeyedpigeon on Sunday October 20, 2019 @06:53AM (#21303378)
I should’ve mentioned I’m using a tablet. Although there’s a convoluted method involving long-hold and the Photos app, it still only save the low-res thumbnail.
Re:Lesser Known Coding Fonts by jwilk on Sunday October 20, 2019 @06:54AM (#21303380)
Maybe try copy&pasting the URL instead of clicking it (so that no Referer is sent)?
Re:Lesser Known Coding Fonts by oneeyedpigeon on Sunday October 20, 2019 @07:00AM (#21303396)
Well, I'm not sure if there's a way of doing that on iOS, but I'm on desktop now anyway, so if anyone else just wants a direct link to the full-size image, here it is:

https://i.imgur.com/LdzBmpx.png

(edit: although, nope, even opening the direct URL to the image reroutes it to the low-res thumbnail version. I just don't think it's viewable on mobile — never mind!)

Re:Lesser Known Coding Fonts by jwilk on Sunday October 20, 2019 @02:54PM (#21306223)
Note that this is the same URL that the one that was originally posted. :-/

Related HN discussion: https://news.ycombinator.com/item?id=21303283

Re:Lesser Known Coding Fonts by cjbprime on Sunday October 20, 2019 @07:07AM (#21303418)
Incredibly readable, thanks for sharing. I like your color scheme, too.
Re:Lesser Known Coding Fonts by mbrock on Sunday October 20, 2019 @10:04AM (#21304211)
It's an Emacs theme called "cyberpunk". :D
Re:Lesser Known Coding Fonts by onion2k on Sunday October 20, 2019 @03:28AM (#21302707)
As someone who's never used a variable width font for writing code, I have to ask why would you want that?
Re:Lesser Known Coding Fonts by kd5bjo on Sunday October 20, 2019 @03:44AM (#21302745)
Variable width fonts are generally more readable, which is why they’re generally used for prose.

Fixed-width fonts allow for easy tabular rendering in a text editor. Some programming styles use this heavily but it’s not universal. Particularly, if you rely on line-by-line blame in source control, alignment changes can make it harder to find the commit where the most recent semantic change happened.

Re:Lesser Known Coding Fonts by zozbot234 on Sunday October 20, 2019 @05:37AM (#21303126)
Traditional fonts even had non-lining figures, with varying heights for easier readability. Modern-style figures were only really used for tabular display, or with content written in uppercase/title-case. (Of course, it's hard to support this kind of complex text styling when editing plain-text files that are going to be fed to a compiler, or some other text-processing step.)
Re:Lesser Known Coding Fonts by oneeyedpigeon on Sunday October 20, 2019 @05:48AM (#21303171)
But source code is very different from prose. Are there any studies on fixed-width vs. proportional readability specifically when it comes to programming?
Re:Lesser Known Coding Fonts by obelos on Sunday October 20, 2019 @03:47AM (#21302750)
I use Geneva for coding. Variable width typefaces are easier on my eyes. I find that my page-scanning more readily gets lulled into laziness when using fixed width. And variable width keeps me from doing goofy alignment games with blocks of similar text (e.g. lining up the `=` signs in a list of assignment operations) that I invariably regret later.
Re:Lesser Known Coding Fonts by seanmcdirmid on Sunday October 20, 2019 @03:40AM (#21302740)
The kerning is easier in your eyes, and is also much more space efficient. The only drawback is the inability to do ascii art.
Re:Lesser Known Coding Fonts by solicode on Sunday October 20, 2019 @04:28AM (#21302883)
While I wouldn't say it's THAT significant, there is one other advantage to fixed-width fonts that I've experienced. Due to the fact that they align vertically, sometimes they expose mistakes if you're constructing data in a table-like fashion. Or when you have a bunch of copy/pasted lines that differ only in the parameter values. Like, "Hey wait a minute... this line is 1 char wider than the previous one. Oh, whoops, I fat-fingered something there".

I wish I had more specific examples and could quantify it better, but I know I've caught quite a few errors this way.

Re:Lesser Known Coding Fonts by koheripbal on Sunday October 20, 2019 @09:56AM (#21304176)
This exactly. Most recently I had a script that was calling functions with fixed width data sets (IDs, credit card numbers, birthdates, etc..), and typos were significantly easier to find due to the data and fonts both being fixed width.
Re:Lesser Known Coding Fonts by seanmcdirmid on Sunday October 20, 2019 @10:09AM (#21304240)
This is because we don’t have any decent rich formatting options available for code in a plain text file. You could totally find those errors in an excel spreadsheet, and excel doesn’t default to using fixed-width typewriter fonts.
Re:Lesser Known Coding Fonts by thenewnewguy on Sunday October 20, 2019 @03:49AM (#21302754)
Maybe it's because I've only used fixed-width fonts for programming and have gotten used to it - but I find fixed-width fonts significantly easier on the eyes.
Re:Lesser Known Coding Fonts by seanmcdirmid on Sunday October 20, 2019 @10:05AM (#21304216)
But would you ever read a novel using fixed width fonts? Modern typography uses variable width fonts for good reasons.

I find type writer fonts to look horrible since I’ve gotten used to variable width fonts. It’s like immediate eye strain for me. But you have to choose a good font, times new Roman won’t work.

Re:Lesser Known Coding Fonts by efreak on Monday October 21, 2019 @01:21AM (#21309531)
I used DejaVu Mono Book for quite a while, I had no problems with it.
Re:Lesser Known Coding Fonts by pmontra on Sunday October 20, 2019 @04:39AM (#21302925)
Only when coding or always, for example books and websites including this one?
Re:Lesser Known Coding Fonts by thenewnewguy on Sunday October 20, 2019 @07:29AM (#21303494)
Only when coding or working with raw text, I use variable-width fonts everywhere else (reading, browsing the web, etc).
Re:Lesser Known Coding Fonts by ithkuil on Sunday October 20, 2019 @03:46AM (#21302749)
And aligning text in some indentation styles
Re:Lesser Known Coding Fonts by IshKebab on Sunday October 20, 2019 @06:21AM (#21303287)
Stroustrup uses them in The C++ Programming Language and it is made it much nicer to read.

If you're using tabs for indentation, and not trying to do pointless alignment then there's really no reason to use monospaced fonts at all - it just makes things uglier.

Re:Lesser Known Coding Fonts by gnud on Sunday October 20, 2019 @04:33AM (#21302904)
I use visual block mode editing quite a lot. I can't imagine that works well with a variable-width font.
Re:Lesser Known Coding Fonts by MockObject on Sunday October 20, 2019 @06:27PM (#21307693)
I can't seem to find even one variable-width font with programming ligatures.