Live data from Hacker News

Dev Fonts

devfonts.gafi.dev

331–340 of 342 posts

Re: Dev Fonts

#331

Earlier quoted context omitted.

Triplicate has a nice look, but l (lowercase L) and 1 (one) are indistinguishable, which is an immediate non-starter for me in a programming font. ( CORRECTION: there is apparently a code version that disambiguates these and others. See comments. That means this probably would be a candidate font for me, except: ) I finally just paid for Pragmata Pro, and haven't regretted it. The unicode support is incomparable, and…

PragmataPro compromises readability across the board - here is why: It is compressed/condensed to allow for shorter line widths but legibility suffers. Put up 2 exactly same code snippets side by side. One in PragmataPro and one with SF Mono (or Consolas, etc.). I purchased PragmataPro but regret it. Now I use it on Mechanical Drawing dimensions :) It is fantastic in CAD.

I actually like the reduced width because of the way I arrange edit panes, and after a brief adjustment period, have no readability issues at the font sizes I typically use. That's a personal taste thing, though, so I can see that others wouldn't like it. The 'm' glyph is a useful bellwether/canary in that it becomes difficult to distinguish the legs before most other glyphs become problematic. I tend to adjust the font size to one level above where the m's start turning into bricks, and have no readability issues, and still ample horizontal space. I don't generally use the font for publication to others (although I'm experimenting with its use in code blocks). I do often use it in projecting demonstrations to students, although that's typically at a large font size, when the legibility isn't much of an issue, but the narrowness is an asset.

Re: Dev Fonts

#332
post #257

Earlier quoted context omitted.

I'm not clear on the outcry against ligatures. This is a client-side setting and not committed to code, is that right? If so, this is like prescribing that we should use dark-mode over light-mode because I like it. Now during the pandemic we might screenshare more often so I can disable it for that, but for development on my own time on my own screen it's nonyabizness.

People like Having Opinions About Things In Public. For ligatures it's bikeshedding taken to absolutely ridiculous extremes. It's past prescribing night/dark mode, it's at the level of pre/proscribing colour themes in a text editor. It is a personal choice and it doesn't affect anyone else bar me. If you don't like ligatures, I don't care, it has no bearing on whether I like ligatures (and it is a personal choice, wh…

I disagree that it doesn’t affect anyone else. The only way it can truly not affect anyone else is if no one else knows that you use ligatures.

And dark/light is fundamentally different: it doesn’t actually change the content, just the colours. Similarly most font choices are purely presentational in effect, with the variation easily within what a normal viewer can be expected to read. (There are exceptions; for example, I’ve seen a couple of fonts go for a very old style of r in their fancy joined-writing style italics which Indians will have no trouble reading, but which has completely fallen out of use in most of the English-speaking world, certainly in Australia, and so may be difficult to read.)

But ligatures change the actual glyphs, so that your fingers must type something other than what your eyes see, and any viewer must decode the ligature’s meaning. And this is the key reason why the proliferation of ligatures in coding fonts becomes a problem for everyone.

If anyone else ever sees your screen (in person, in a screencast, or in teleconferencing with screen sharing), it has affected someone else.

At an objective level, I think it’s fairly clear that for most people in most circumstances, a light background is superior to dark, and ligatures are a bad idea. However, at a personal level, the subjective factors routinely outweigh the fairly slight objective factors.

Popularity breeds popularity. I have been exposed to ligatures in coding fonts on websites and other people’s screens. I never chose to use ligatures.

There’s an ancient philosophical question about personal freedoms in all this.

Re: Dev Fonts

#333
post #236

There's a certain style of programming font, I think due to narrow strokes and sharp curves that I at least find universally ugly and often hard to read. From this list Monoid, Iosveka, Anonymous Pro, and Share Tech Mono at least fall into that category. I think it's meant to be sort of a callback to bitmap fonts? I know the Linux console font (terminus) looks similar, but that's clearly due to technical limitations.…

I love all those fonts! Right now I'm using Iosevka Term at Medium weight since I can cram a reasonable amount of code in horizontal space and the style looks very appealing to me.

This is with monitors at around ~130DPI. For regular old 96 DPI monitors I used tewi, a very small bitmap font.

I'm running Linux so most things are rendering on FreeType, here's a screenshot of Iosevka Term with some random youtube-dl code: https://i.imgur.com/qQHmOX2.png

Re: Dev Fonts

#334
I use Pragmata Pro because it supports monospaced Arabic text very well and I frequently have to work with Arabic. I've never seen a font that supports monospaced Arabic before.

Re: Dev Fonts

#335
post #205

I'm surprised DejaVu Sans Mono isn't listed.

Indeed. It's a classic. Top notch Unicode support. I think some of the fonts in that list are actually forks of DejaVu Sans Mono, e.g. hack. https://news.ycombinator.com/item?id=10141120

I've been playing around with different fonts for code and always come back to DejaVu Sans Mono.

Re: Dev Fonts

#336
post #311

Earlier quoted context omitted.

As I'm not keeping up with recent progress of the language, how would you do that today?

If x is your variable, you can just do Boolean(x) rather than !! to make it boolean. E.g. it will convert undefined, null, 0, "", and NaN to false. This is a much more readable cast.

Personally I think it is a good rule to never use Boolean(x), String(x), etc.

The problem is that many developers are unaware that `const s = new String(x);` creates a string Object. It looks like a string, and acts like a string, except that in some places it is not a string: for example `typeof s` returns “object”! Same problem for Boolean, Number, etcetera. Yes casts are ok, but it is easier to just say never use the value object keywords because you can end up with very wierd bugs a long way from where the value object was created.

Another example:

    let x = new Boolean(true);
    console.log(x === true);
Gives false.

Re: Dev Fonts

#337

Earlier quoted context omitted.

People like Having Opinions About Things In Public. For ligatures it's bikeshedding taken to absolutely ridiculous extremes. It's past prescribing night/dark mode, it's at the level of pre/proscribing colour themes in a text editor. It is a personal choice and it doesn't affect anyone else bar me. If you don't like ligatures, I don't care, it has no bearing on whether I like ligatures (and it is a personal choice, wh…

I disagree that it doesn’t affect anyone else. The only way it can truly not affect anyone else is if no one else knows that you use ligatures. And dark/light is fundamentally different: it doesn’t actually change the content , just the colours. Similarly most font choices are purely presentational in effect, with the variation easily within what a normal viewer can be expected to read. (There are exceptions; for exa…

> The only way it can truly not affect anyone else is if no one else knows that you use ligatures

That covers 99.999999999% of the times ligatures are used then, that's my point.

Sure, in a situation like screensharing, using ligatures "affects someone else". A font also "affects someone else". A theme also "affects someone else". Night/dark mode also "affects someone else". That's a given. It's also something that is normally trivial to turn on or off.

And sure, very, very occasionally people use custom fonts with ligatures turned on in the CSS on websites.

> I think it’s fairly clear that for most people in most circumstances, a light background is superior to dark, and ligatures are a bad idea.

It's not clear at all. Regarding typefaces and character sets and reading comprehension, what a person is used to reading turns out to be the easiest thing for them to read (why do you use a monospaced font in your text editor?). I get that it's a fun thing to argue about because it is completely stylistic, context-sensitive and personal and has near-zero real world effects (I'm doing it now!)

> But ligatures change the actual glyphs, so that your fingers must type something other than what your eyes see, and any viewer must decode the ligature’s meaning.

As opposed to typing a collection of "actual glyphs" which the viewer must then decode back to their actual meaning via the conventions of the language? The characters available a given programming language are determined by [sensible] technical limitations, so creative use needs to be made of those to represent concepts that are already represented by single, well known characters that are not available in the PLs character set.

My beef is that talking about which fonts you like/dislike: that's a productive discussion as they're a personal thing, very often an aesthetic choice.

But banket saying "usage of this _type_ of font is bad": that's not productive in any way, it's pointless, as it ignores the huge % of people who clearly don't share this view. Saying "it's fairly clear ligatures are a bad idea": no, it's display preference, and if is forced on you, you will generally have agency to request it be changed back to something you are used to.

And this is every time coding fonts appear in HN: comment after comment stating the latter as if it's some empirical truth when it most definitely is not (and yes, similar thing for tabs Vs spaces etc, so obviously everyone paints the bikeshed, but this time it's completely tied to one person's personal computer display)

Re: Dev Fonts

#338
post #23

Earlier quoted context omitted.

This looks really nice, too bad it doesn't (and never will) support ligatures. I understand the point the author is trying to make about ligatures in the separate blog post, but boy do I love my ligatures when programming.

I am not fan of ligatures because of the (although small) mental gymnastics that have to happen when reading code. It's unnecessary.

I got used to them really quickly to the point that I prefer them over regular characters. No mental gymnastics required.

Re: Dev Fonts

#339
post #309

Earlier quoted context omitted.

“ligatures in programming fonts are a terrible idea” I agree as well with the point about ligatures, but I find funny that the advice comes from a site that thinks straight up normal text with no hover, no distinct color, no distinct font and no underline is a good way to signal linked pages https://i.imgur.com/9iVMfgD.png (who would have guessed Racket was a link?)

In short it’s a design choice paying homage to some other books, as well as to make the reading experience less distracting. He has a whole page explaining here, https://practicaltypography.com/how-to-use.html

...and then he decided to put his name in small caps under the ligature article, and that one isn't a link.

Re: Dev Fonts

#340
post #294

My favourite monospaced font is Triplicate https://practicaltypography.com/triplicate.html >: the only true serif monospace that I know of (though I have a vague feeling I found one other at some point). Every other serif monospace I know of is a slab serif. Triplicate’s variable stroke thickness is also exceedingly rare in monospaced fonts; almost everyone goes for uniform stroke thickness, as is customary with sans…

As far as serif monospace, NSimSun is still my favorite. It's in Windows. I love Triplicate but can't bring myself to purchase yet. I like Equity, too. I think Triplicate is the closest to the old Selectric Prestige font, which I loved. But if anyone has NSimSun replacements (paid or free), please let me know.

A sibling post [1] mentioned Xanh Mono, which looks similar to NSimSun IMO. They both have that distinctive "Latin script alongside eastern script" serif look.

[1] https://news.ycombinator.com/item?id=25161756

Post reply on HN