Live data from Hacker News

Dev Fonts

devfonts.gafi.dev

321–330 of 342 posts

Re: Dev Fonts

#322

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…

What's the decision process behind _choosing_ a font? I've always gone by look and feel but I've never felt fully satisfied with any of the (code) fonts I've chosen. I used Incosolata for a long time and in the last year I've moved to Hack. I really like Hack a lot but I am also trying harder to make more conscious decisions with my physical programming environment as I age (beyond aesthetics, caring about ergonomics…

I'm dyslexic. Because of that, I've spent a bit of time thinking about this for practical reasons. I prefer heavier sans-serif fonts with no character ligatures, but I like symbol ligatures and glyphs; they're not deal breakers. I've been using Cascadia Code, and find it usable, don't like the dotted 0 (the fact that the top and bottom of the 8 round in sharply helps offset this) or the few serifs it has. I've used Ubuntu Mono (spacing is too tight) and Source Code Pro (lines are too light) in the past.

What I look for is legibility between things like ({}), l1!|I, Oo08, mwnu, tl bpdq, ecoa, and being able to distinguish repetitio and symbols like --, ==, !!, "'`, :;, _-, and even ,.. (Something's going to try to parse that and absolutely shit itself)

I just grabbed B612 Mono.

n.b. I hadn't actually assembled those thoughts into one place before now. I apparently have Opinions about this!

Re: Dev Fonts

#324
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.

Okay, thanks. And why would it be faster? Optimizing !! in the JS engine seems trivial to me.

Re: Dev Fonts

#325
post #324

Earlier quoted context omitted.

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.

Okay, thanks. And why would it be faster? Optimizing !! in the JS engine seems trivial to me.

I suppose it would be easy and might already be in some engines, but it's still discouraged because you can't rely on that optimisation (there are many engines), it's semantically incorrect, and most importantly much less readable - especially for someone not tok familiar with the JS type system.

Re: Dev Fonts

#326
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

It's a pretty interesting approach to the website and there's some features I never would have discovered on my own, but the author's reasoning seems pretty poor. The premise being that multi-line stretches of underlined text are difficult to read, therefore link-text (typically 1-3 words) should not be underlined.

It's also quite ironic that the author's argument against ligatures in programming fonts is that the simple substitution doesn't respect semantic difference, whilst using emphasis to signify that there is a link present

Re: Dev Fonts

#327

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…

Go Mono is another nice looking serif monospaced typeface I use.

Re: Dev Fonts

#328
post #257

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…

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, what fonts are easier to read is always based on what I'm used to reading text in)

/rant

Re: Dev Fonts

#330

Am I the only one who uses a proportional font for coding? I find it more readable for the same reason it's more readable in books and other printed media.

Which one do you use? I love proportional font but find most of them not suitable for code. Input Serif is the only proportional programming font I can find but it looks too old school.

Georgia, modified to put a slash through the zero, and a small horizontal line, like a serif, on the l. Theory being, letters in serif fonts are easier to distinguish since visually they're more different from each other. Same reason the body text of books uses something like Times New Roman, only headings use a sans serif font.
Post reply on HN