Live data from Hacker News

Programming Fonts – Test Drive

app.programmingfonts.org

231–240 of 289 posts

Re: Programming Fonts – Test Drive

#231

Earlier quoted context omitted.

> Curious. How do you line things up? I don't! :-) I spent many years lining things up. I would write code like this: foobar(firstArg, secondArg, thirdArg); (For the sake of discussion, assume that those arguments were too long to just put it all on one line, so you would naturally want to use multiple lines.) Then when I realized that 'foobar' wasn't such a good name, I had to re-align all the code: doTheRealThing(f…

This does force you into a style where lists of indented things require a new line - not necessarily bad, just an observable side effect, and can cause problems if you share a codebase that maintains a different style.

Very true, if you are working on an existing codebase, you ought to follow whatever style it uses.

Interestingly, one of the reasons sometimes cited for using alignment is that it reduces the number of lines of code needed for a statement or expression. But as often as not, I've seen that backfire because the code gets pushed farther and farther to the right, eventually resulting in more lines of text instead of fewer.

I posted an example from the Rust/Servo code in another comment:

https://news.ycombinator.com/item?id=18962177

This code in their old column-aligned style is actually one line taller than the indentation style they recently switched to.

Re: Programming Fonts – Test Drive

#232
I use a very simple test to verify if fonts are usable in programmer/technical environments:

- check the readability of lower and upper case "i" (india) against the number "1" (one)and the lower and upper case "l" (lima).

- Check the readability of the lower and upper case "o" (oscar) against the number "0".

- check if the font can be used monospaced with being reasonable to good readability.

If it passes those checks then it is often good enough for me.

Re: Programming Fonts – Test Drive

#233
post #176
post #175

Earlier quoted context omitted.

> "When the strike passes the edge of the circle, it's no longer a zero, it's a Danish or Norwegian "Ö" (Ø). It's been a part of their alphabet for centuries." You can't please all the people, all of the time. There are ~21 million people living in Scandinavia - and for them, that could indeed be somewhat of an issue. What about the rest of the planet? > "By badly thought out design and a need to be different for no…

> What would you consider to be a better design then? > > "When the strike passes the edge of the circle, it's no longer a zero,

Well, at least he wasn't belligerent.

Noticing a lot of threads like that on Reddit lately. Hope it doesn't spread.

Re: Programming Fonts – Test Drive

#234
post #102
post #38

Earlier quoted context omitted.

Curious. How do you line things up?

I would suggest that using elastic tabstops¹ is the only reasonable system for doing that. Sadly, the industry seems to be stuck in a local maxima where the simultaneous jump to both using proportional fonts (which would be better) and using elastic tabstops for alignment (which would be easier), constitutes too large of a distance to bridge in a single leap, and either one by itself isn’t worth the effort. Of course…

I think it's even worse: the big problem with elastic tabstops is that you can't just adopt them on your own. You are requiring everyone who reads your code to use them if they want to see it formatted properly.

Proportional fonts are different. Anyone can use them without interfering with readability regardless of the fonts and editors that others use. If you look at my code, you will never know whether I wrote it in a proportional font or a monospaced font.

Re: Programming Fonts – Test Drive

#235
post #4

One of my favorites is PragmataPro [0] (with powerline glyphs) and I'm sad it's not there. I guess they can't use proprietary fonts. PragmataPro was so weird when I started using it but it has grown on me and now I have a hard time switching to a terminal that uses something else. In any case, if you're like me and you look at the terminal screen for hours on end every single day, find some font that won't tire your…

All those ligatures for , =, etc. annoy me to no end. Ew.

I only see them on Fira Code, Hasklig. Oh, Monoid too.

For ligature fans: https://www.hanselman.com/blog/MonospacedProgrammingFontsWit...

Re: Programming Fonts – Test Drive

#236
post #160

Earlier quoted context omitted.

Hi, I'm the author of programmingfonts.org. Operator Mono certainly is pretty. I always loved consolas on Windows (honestly, it's the only thing that rendered properly on Win7). That said, I can only include fonts that are freely available, or where the owner of the font allows me to (in the case of Input Mono). I have tried for a few others, but haven't been so lucky there. So, no proprietary or otherwise commercial…

Can't you have a "system fonts" section that uses the fonts already installed, so people can compare if they are running the respective OS?

Well, there is no way to get a list of installed fonts via the browser, but I have thought about adding an input so you can try installed fonts. I just don't have enough time to tackle all the ideas I have!

Re: Programming Fonts – Test Drive

#237
post #225
post #161

It drives me crazy when fonts look at the old convention of "strike through zero" and for some reason decides they need to be different from the convention and allow the strike to pass the edges of the zero circle. "Anka/Coder" in the linked article is guilty of this. When the strike passes the edge of the circle, it's no longer a zero, it's a Danish or Norwegian "Ö" (Ø). It's been a part of their alphabet for centur…

So you're reading a number and then -blurp- your mind goes "Danish" or "Norwegian" letter? Context doesn't come into play? I mean - I can understand such confusion if you are dealing with some kind of multi-character random code or such (ie - a "confirmation code" for instance), and the site is primarily targeted to Danish or Norwegian users; in that case, the confusion would be valid. Much like such codes in "Englis…

it's about as annoying as finding the difference between a o or 0.

it's about cognitive load

Re: Programming Fonts – Test Drive

#238
post #225
post #161

It drives me crazy when fonts look at the old convention of "strike through zero" and for some reason decides they need to be different from the convention and allow the strike to pass the edges of the zero circle. "Anka/Coder" in the linked article is guilty of this. When the strike passes the edge of the circle, it's no longer a zero, it's a Danish or Norwegian "Ö" (Ø). It's been a part of their alphabet for centur…

So you're reading a number and then -blurp- your mind goes "Danish" or "Norwegian" letter? Context doesn't come into play? I mean - I can understand such confusion if you are dealing with some kind of multi-character random code or such (ie - a "confirmation code" for instance), and the site is primarily targeted to Danish or Norwegian users; in that case, the confusion would be valid. Much like such codes in "Englis…

> So you're reading a number and then -blurp- your mind goes "Danish" or "Norwegian" letter?

Yes, because my native language is Swedish, so I frequently come across this letter.

> Context doesn't come into play?

Would you use this argument against someone that said zero and the letter O are too similar? I doubt it, and I suspect your casual approach to this is based on the fact that you never encounter this letter.

Re: Programming Fonts – Test Drive

#239
post #161

It drives me crazy when fonts look at the old convention of "strike through zero" and for some reason decides they need to be different from the convention and allow the strike to pass the edges of the zero circle. "Anka/Coder" in the linked article is guilty of this. When the strike passes the edge of the circle, it's no longer a zero, it's a Danish or Norwegian "Ö" (Ø). It's been a part of their alphabet for centur…

I actually find the coin-style zero superior, like that shown in Hack font, as it avoids ambiguity with the Ø symbol.

I don't mind it, using an image for zero that is exclusive is of course preferable. But seeing how common the "slashed zero" is, I think the least we can do is avoid making it more confusing than it already is.

Re: Programming Fonts – Test Drive

#240
post #44

I'm surprised that the list doesn't mention consolas. It ships default with visual studio and it's so good that I use it on arch Linux as my terminal font and with intellij. It was designed with programming in mind and has some nifty characteristics like a slash through zero. This list also misses out on 'operator mono' which is a well thought out font for programming.

Hi, I'm the author of programmingfonts.org. Operator Mono certainly is pretty. I always loved consolas on Windows (honestly, it's the only thing that rendered properly on Win7). That said, I can only include fonts that are freely available, or where the owner of the font allows me to (in the case of Input Mono). I have tried for a few others, but haven't been so lucky there. So, no proprietary or otherwise commercial…

Have you looked at the licensing of the Lucida family of fonts (particularly Sans Typewriter and Console)? From a quick check it looks like just the old bitmap fonts are available for redistribution, and all the scalable varieties are proprietary, but I'm also seeing some contradictory information, so I'm not 100% certain on that. If allowed it would be a great addition to the site.
Post reply on HN