712 points · by southwindcg · 7y ago · 283 comments
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.
The whole purpose of the "strike through zero" is to stop it from being mixed up with Omega. By badly thought out design and a need to be different for no reason, you just returned to square one, because the font is now unreadable for anyone that knows or works with the letter Ø.
(Lowercase ‘θ’ is quite common to indicate a vector of parameters. I’ll admit, though, that few people are ~courageous~ adventurous enough to use the actual symbol in their variable names rather than the string ‘theta’.)
For what it's worth, the first machines I ever did any work with had the zero with the slash through it. That's because the output was to a teletype which printed the letter O, then went back a space and punched a / on top of it. They also used a capital P for a question mark.
Some printouts were horrific to read because a blank space was represented by a "b" with a / through it, not an underscore.
So I think that for computing the 0 with a slash extending outside the line predates the 0 with the slash entirely inside the line.
I'm not sure when or why the 0 with a dot in the middle became a thing. I first noticed it around 1989 on cheap (for the time) VGA cards.
For computing, sure. But the Danish letter pre-dates computers, likely by centuries, so the point still stands that an effort should be made to separate the two if at all possible. In your case it wasn't so much a choice as a result of technical limitations.
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 "English" (maybe "Latin" might be a better description?), without having a distinguishing mark for the zero, and depending on the font used - where a zero can look like a capital letter "O". Was that "0" or "O"? That can be an issue, depending on the language of the users, etc.
But aside from those particular cases, which aren't very frequent, most of the time you can infer what is meant by what, based on the context of the surrounding characters and the information that is likely being conveyed.
I'm not sure one should get too upset by such a minor thing...?
Yes.
Once you become really fluent in a different script, I find that misuse of it starts to become really annoying.
Before I had any proficiency in a language using the Cyrillic alphabet, if someone replaced say an A with a De (Д) or a W with a Sha (Ш) in an English text, I'd have no trouble reading it. Now, this kind of thing always trips me up and I've heard from several native speakers that they absolutely hate this kind of thing. To the people doing this to lyrics of metal songs in particular: please stop.
If I had to have a guess at why, I'd say if you are fluent in English but not a Cyrillic language, then your "System 1" autocorrects such mistakes to the the closest English word without you noticing. Once the other letters start to mean something, you consciously notice the mistakes as such. (For an example of the mental "autocorrect", did you notice the repeated "the" above? h/t Scott Alexander.)
Same idea with that game where you have words written in different colours but you have to read the colour instead of the word, so if "blue" is written in green you have to read "green". It's incredibly annoying in a language that you know, but really easy in a script/language that you don't know.
It absolutely drives me up the wall when I see uppercase lambdas used for A.
For example, the car company Kia styles their name KIΛ, which makes me think "Kil". Or the monitor company AOC writing it ΛOC.
And recently I've been watching an anime called Aldnoah.Zero, which stylizes its name as ΛLDNOΛH.ZERO. That one is particularly aggravating because the lambda is right next to an L!
Likewise with O; the commonplace zero with no slash would likely look like a jarring typo also, if Danish had that 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.
it's about cognitive load
Interesting history, there's a couple of theories.
That's what pretty much everyone does when whiteboarding.
> When the strike passes the edge of the circle, it's no longer a zero
When a second stroke is added to the oval, it's no longer a zero to most people, other than programmers.
When no such stroke is added, it's also the letter O to most people; far more people than just Danes and Norwegians. Nobody is jarred by the appearance of a letter in the middle of a number. The ambiguity is embraced in informal English, where zero is pronounced as "oh", like 007 being "double oh seven".
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 reason, you just returned to square one, because the font is now unreadable for anyone that knows or works with the letter Ø."
Out of curiosity, what would you consider to be a better design?
> > "When the strike passes the edge of the circle, it's no longer a zero,
Noticing a lot of threads like that on Reddit lately. Hope it doesn't spread.
Alternatively the strike could pass the alternative way through the symbol.
I don't think there is one. The standard is the standard for a reason, and doesn't need to be better IMHO.
Even so, comparing each font on your site affirmed my choice (Hack ftw). I'll be back, though, and will check out your blog in the mean time.
I'm surprised that so many of these 'programming' fonts do not have dotted or slashed zeros. For a programming font, that's a must-have requirement for me. I edited Droid Sans Mono, so that its zero had a slash, and now I use it as my go-to font for all my IDEs and terminals. However after browsing this lot, I'm tempted to give Go Font a try.
Thank you for your work on Inconsolata.
[1] https://docs.microsoft.com/en-us/typography/font-list/lucida...
A steal at $199!
Identifont is a similar system. It uses a twenty-questions style format to identify an unknown font.
[0]: https://github.com/weaversam8/bracket-based-decision-making
Currently, having to visually bounce from code window to font selection window and back slows me down and makes it harder for me to compare fonts.
J/K for next/previous font
A/Z to increase/decrease font size
S/X to increase/decrease spacing
T to toggle anti-aliasing
https://gist.github.com/MCluck90/1cbcbb615eca18466b8be6c7ec0...
For this list of programming fonts, I could first select (mark) a bunch that just match my general taste (shape, weight, x-height). Then I would be able to easily switch between my selection/shortlist to inspect more detailed differences such as how numbers are aligned with respect to brackets and operators, or whatever.
Currently it's a bit hard to do if you have to keep a mental shortlist of fonts you like enough for further inspection, to remember which ones to check back on (especially if you see some names for the first time).
Regardless, it's a really cool site, great resource, and already the comparing mechanism is pretty nice!
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 eyes and is optimized for your screen. If you have to squint or double-check letters or numbers because they're unclear, increase the size or switch to a different font.
Just did a quick check... I bought it in Sept of 2012, 2323 days ago.
$70 / (2323 day * 6 hrs/day) = $0.005/hr
Did I get my money's worth (and mind you, I paid less than that.. I'm just going by today's prices)? I think I did. It all depends on how you value things.
It's a slab serif, condensed. You have to like the style. Some people prefer the opposite (wide with ample interline spacing).
It packs quite some columns on the screen while still being perfectly readable and basically every glypth is hand-tuned for small pixel sizes. There's not much else comparable designed with that amount of care.
The closest font on a stylistic basis I've seen is Iosevka.
PragmataPro does come without ligatures though, and that's what I've been using as my main font for over a year now.
For ligature fans: https://www.hanselman.com/blog/MonospacedProgrammingFontsWit...
Is there something wrong with Hasklig, Fira Code, or Inconsolata?
Also, I think increase in screen resolution contributes somewhat. I find that I'm a lot pickier about fonts after getting a 4K display.
Oh boy... Don't get me started on this. Those semi-consistent application of serifs, wide vertical traces and the overall MDA-ness of it drives me nuts. It's not like IBM didn't have anything better to choose from.
disclaimer: I make the 3270 font, which is based on the 3270 terminal font, which is the better thing I mentioned in the above paragraph.
https://github.com/ryanoasis/nerd-fonts
Then your editor can look like this:
https://raw.githubusercontent.com/wiki/ryanoasis/vim-devicon...
It's not all just for looks. For example you get icons for file types so it's also useful. My favorite is the Nerd Font version of Droid Sans Mono.
<!-- Making DejaVu Sans Mono more slim -->
<match target="font">
<test name="family">
<string>DejaVu Sans Mono</string>
</test>
<edit name="autohint" mode="assign">
<bool>true</bool>
</edit>
</match>It's weird because I can be pretty snobbish and opinionated with a lot of programming-related stuff (I use a very expensive keyboard, a large 4k screen, a heavily customized editor and window manager etc...) but when it comes to fonts I really have a hard time finding a real improvement with some of the very expensive fonts people are recommending in this thread compared to good old DevaVu.
I would be very interested to read an article that would explain in details what makes certain fonts better or worse than others, especially for programming.
Conversely I like almost everything about Fira Code, except the weird serif-ed lowercase "r" looks so out of place to me it kind of spoils the entire thing.
But then again I think if I tried Fira for a week or two, I'd stop noticing and no longer care. It's so very subjective.
It comes with some interesting variants, most notably Poly which is not fully monospaced, adjusting the widths of characters like i to be a little narrower, and W to be a little wider. I like to use that for code display.
It has serifs and true italics. Might be an interesting free alternative.
Even though it's a reasonable price for a commercial font, I can't really justify spending $99 on a coding font just for writing code. I might get tired of it after a few weeks. But if I were to write a programming book, I just might consider it for print.
Personally I use and recommend Liberation Mono / Cousine at 9pt / 12px. I've been using this font for years so it's just ended up what I'm the most comfortable with for both reading and writing.
* bitmapped + ligatured fonts - you can have both!
* sans-serif normal, serif italics - Italicized words were serif-ed. "Latin Modern Mono" is an example. Also, Donald Knuth made that font - did you know Donald Knuth made a font?
Really cool work, thanks for making this.
I realize that most programmers use monospaced fonts, but I personally find proportional fonts to be much more readable and pleasing to my eye. I would be really interested in a similar font comparison that included proportional fonts that are suitable for programming.
Right now my favorite is Trebuchet MS. This renders beautifully on the high-DPI displays I use, and it has easily-distinguished glyphs for the common mistakables like Il|. Its tilde is not very good though, so I used a font editor to swap in a better one.
But I'm always interested to hear about other options!
When I do have to use a monospaced font (e.g. in a terminal window), Liberation Mono is my favorite. Definitely worth a look if you like monospaced fonts.
These days my eyes are dimming, so I dislike skinny fonts. Now I use DejaVu Sans Mono in _bold_ exclusively. Every now and then when HN does a programming font post, I try out different ones, but I always end up going back to DejaVu Sans Mono Bold.
Also, the old VGA font is surprisingly nice and legible. Can be had here:
You might take a look at Trebuchet MS. One thing I like about it is that the strokes are nice and fat. At least on my high-DPI displays; haven't checked on a low or medium DPI display.
https://www.microsoft.com/en-us/p/verdana-pro/9n8d67vhhdc2
Coincidentally, I wonder if the license allows it to be downloaded and installed on other OSes, like the old "Microsoft core fonts" package that included Verdana.
This makes sense: our eye uses the top and bottom of words to ‘key’ the word. Use proportional and you add information to this system.
[1] https://blog.codinghorror.com/comparing-font-legibility/
[2] https://journals.sagepub.com/doi/pdf/10.1177/001872088302500...
(edit: add references to research)
Coding using proportional fonts is easy to get used to, and it has its proponents. The key is: indent, don't align, and use TABs.
https://news.ycombinator.com/item?id=18958335
But one thing I'm wondering about:
> All of the tooling for writing code defaults to monospace...
Do you have an example of such tooling? One that I'm familiar with is Google's coding standards, which are obsessed with lining things up in ways that only work in monospaced fonts. Is that the kind of thing you're thinking of, or something else? Thanks!
People are always puzzled when they learn I'm not using a monospaced font, think it's impossible but agree that it's much more readable. Then keep using their monospaced fonts.
Actually, nobody likes to read books or blog posts printed with monospaced fonts, right? There is no reason to do it with code.
Alignment like this
short = 1
much_longer = 2
is lost but it's not really important. I think it's also against Python's style guide and for sure it doesn't survive the Elixir formatter (I checked this now.)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(firstArg,
secondArg,
thirdArg);
At some point, maybe 20 years ago, I got really tired of this.So I thought, "what if I just use indentation instead of trying to line things up in columns?" Which led to this:
foobar(
firstArg,
secondArg,
thirdArg
);
And when I renamed the function, I didn't have to move everything around any more: doTheRealThing(
firstArg,
secondArg,
thirdArg
);
Instead of every line changing, only one line changed. [1]After I adopted this style, I noticed that the code editor I was using at the time supported proportional fonts, so I got curious and tried one - I think it was Verdana.
And sure enough, the code was just as readable as it was before.
If you don't line things up in columns but instead just use indentation, then a proportional font works just as well as monospaced.
[1] Some will say "just ignore whitespace in your VCS diffs, and this won't be a problem." But I want to know about whitespace changes, just like I want to know about any other change.
Cannot you just have your editor do that for you?
Of course, if you already have made one of these two jumps, it should be a no-brainer to make the other one as well.
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.
Most things line up perfectly fine i IntelliJ.
I have had someone on my team with an itch for lining up variable assignment. That was the one thing that looked off.
int abc = 3
int defg = 4
int bigTestVaribale = 6Nevertheless, for teams that insist, the auto code formatter makes it look ‘nice’ for them.
Personally, I think vertical alignment apart from indentation is a mistake for more than these reasons. It implies a structure where there is none.
There is no tilde in Lucida's snapshot, but I would rate the font very low on the readability of the other characters. The other parameters (serif, form of the "g", etc) are of no importance to me if the first test fails.
[1] https://docs.microsoft.com/en-us/typography/font-list/lucida...
The GitHub link is somewhat buried in the post: https://github.com/iaolo/iA-Fonts
It also helped me understand something about the font sizes that always puzzled me (but never enough to actually look it up).
All of the fonts there have the size of 16, but some are clearly bigger than others. Compare e.g. Inconsolata and Meslo:
http://app.programmingfonts.org/#inconsolata http://app.programmingfonts.org/#meslo
Having them side by side, you can see that they contain the same vertical amount of space. Inconsolata's glyphs are smaller, but they're still in the box of the same height.
It does seem that the "font size" only refers to the height, though. The width is clearly variable.
To anyone who actually understands this properly: is the above correct or is that just an artefact of how the website renders the text?
Width can always vary. Combinations of greater width and x-height make the letters look bigger.
At least, that’s the way I’ve always understood it.
This image shows it clearly:
http://kapundahigh.weebly.com/uploads/6/1/5/4/61545621/xheig...
- 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.
- Is there a lighter weight variant from which one can steal ()[]{} ? Essential for Lisp programming, nice for every language.
My current winner is Roboto Mono Regular, with brackets borrowed from Roboto Mono Light. The font disappears on me (attitude takes bandwidth) and one would never know I played with the brackets till one goes back to another font, and it becomes obvious brackets on a Retina display have no business having the same weight as body text.
Sample ('Zoom Out' for realistic scale): https://www.math.columbia.edu/~bayer/etc/RobotoLisp.png
I'm definitely going to try this out.
It might be nice to include some detail as to the features provided by some of the fonts on the font list, if it can be done without making the UI too busy.
I'm thinking indicators for things like: true italic provided (instead of leaving the OS to use false italics), true bold provided, programming ligatures (as seen in those like Fira Code), ... Perhaps filters too.
Monaco or Source Code Pro
You also have to try them in your terminal or editor, because on the web isn't the same experience.
For some reason, switching fonts does not work on my browser.
Firefox 64.0.2, windows 10 64 bits
No error message in the console, and ublock origin plugin didn't block anything on the page.
Opening the same page in Google Chrome worked well: font changes in the demo code whenever user clicks on a font in the list.
The `Allow pages to choose their own fonts` option was enabled. However, a customization in my userContent.css prevented the font changes to be applied:
pre {
font-family: "DejaVu Sans Mono" !important;
}
Starting Firefox with a new profile showed that the site works correctly.That seems a bit of an overreaction, no?
I've been experimenting with a variety of fonts in Sublime Text 3 on Linux, and I keep coming back to the default, which is apparently called emilbuS Mono, and looks like Bitstream Vera Sans Mono.
But overall I like that lowercase letters have nice, readable descenders and hints on HIDPI displays, and that my editor now looks exactly the same on Windows and Mac.
It's hard for me to imagine that I would choose a font based on usage data and statistics: "25% more coders use Inconsolata than Verdana, and they suffer 3% less eyestrain as a result."
How would you even measure such a thing? A font that works well on a low-DPI display may not be the same one that looks great on a high-DPI display. And one person's eyes are not my eyes.
I look at a font, try using it in my work, and either I like or I don't like it. Even if I do like it, I will probably find some flaws in it and fix them in a font editor. Or maybe I don't and just live with it.
I always enjoy comparing notes with people about what fonts we like to use. But this seems like personal preference, not science.
Here is the docs for the font: https://docs.microsoft.com/en-us/typography/font-list/simsun...
It feels unsupported overall, but I set it up in the terminal and text editors and I am happy with it, It looks like a proper font, and not a dumbed-down-to-align-to-pixels font.Also there are some missing glyphs like áéíóú, but maybe if more people use it, MS will improve the font =)
It would be nice to have some flags to show what the license is for each one.
Does anyone have any known good reference sites for going about creating your own font? I've thought about this a lot yet never had the time to do. I think creating my own would be incredibly cool!
https://screenshots.firefox.com/9wlM0C9RCyou4Rk9/app.program...
I've tried many of the more famous ones but the clarity is simply good.
1. Show an indicator which font is currently selected.
2. Allow users to save their favorites, so they can find what they like faster next time they visit.
Thanks for sharing it, it's very useful :)
That said, I have to check those out you mention (never heard of any of them). Thanks.
My current personal favourite is Hasklig.
Most of the fonts on this list don't even come close.
Strange to be using an italic to code in, but I quite like it.
edit: someone has actually added ligatures to operator mono if that's your thing (https://github.com/kiliman/operator-mono-lig)
Though, the price for the Mono-only (bottom of sidebar) does match what you said. So I’m guessing it’s just misread/UX.
Edit: sentence clarity
It's a fantastic bitmap[2] font and I find that I use it on all my low-DPI screens. I think it reads a little better than gohu, but agreed: there's no love for tiny fonts on OP's link...
(props for remembering set values between reloads though)
> The DejaVu fonts are modifications of the Bitstream Vera fonts designed for greater coverage of Unicode, as well as providing more styles.
Thanks for the website, klageveen!