Chrome (assuming you're using Chrome) draws it a specific way. This does not match how Freetype (using typical tuning) or DirectWrite draws it. Chrome's choices in font renderer tuning and blending makes it kind of split the difference between Windows-style and OSX-style, and isn't native to either.
What it should be doing is showing you lossless screenshots of actual in-app renders at different sizes. Some in Chrome (to represent the Electron apps), some in DirectWrite, some in OSX post-Retina, etc.
Some fonts look amazing at larger sizes, but are unreadable at smaller ones. Some perform exceptionally well at smaller sizes. Some look great on every font renderer but OSX's, but some only look right on OSX and look bad everywhere else.
I've sorta played this game with myself, in a semi-objective way: take a bunch of fonts, ignore the subjective art nature of them, and throw them at a bunch of common renderers and see what the optimal size is, and then sort by smallest legible size.
If we define Fira Code, the most popular code font out there, as the bare minimum, 8 of the ones I tested beat it, while 17 were worse.
https://github.com/Diablo-D3/dotfiles/blob/master/fontsizes....
Set `FREETYPE_PROPERTIES="cff:no-stem-darkening=0 autofitter:no-stem-darkening=0"`, and then also enable (S)light hinting on LoDPI, or None on HiDPI. Also, disable subpixel and use greyscale only.
OSX looks the way it does because they use excessive stem darkening combined with incorrect gamma blending. GDI, WPF/UWP/WinUI, most ClearType/DirectWrite consumers, GTK, and most browsers also do incorrect gamma blending as well.
Qt is the exception. It enables stem darkening by default, but then uses correct gamma blending. Unfortunately, this is the objectively correct way of rendering, everyone else is doing it wrong.
The only thing you can't do is OSX gamma blends incorrectly for 1.8 on a 2.2-2.4 screen. Everyone else blends incorrectly for sRGB/2.2 on a 2.2-2.4 screen. Light on dark's obscene behavior on OSX shouldn't be replicated.
If you want the opposite, and make it look like Windows, force stem darkening off (use the above env, but set both to 1), and set hinting to Full to make it look like pre-Cleartype, or Medium to make it look like DirectWrite.
Interestingly, Ubuntu Mono was the font I landed on - which is already the font that I use. At least I'm consistent.
And if you use Emacs, it's configurable at the buffer level. [1] This lets me build a version of Iosevka where `~=` and `!=` both become ligaturized but in different major modes, avoiding any confusion.
Some people like ligatures, some people do not like them, but this does not matter, because any decent text editor or terminal emulator has a setting to enable or disable ligatures.
Any good programming font must have ligatures, which will keep happy both kinds of users, those who like and those who dislike ligatures.
I strongly hate the straitjacket forced by ASCII upon programming languages, which is the root cause of most ambiguous grammars that complicate the parsing of programming languages and increase the probability of bugs, and which has also forced the replacement of traditional mathematical symbols with less appropriate characters.
Using Unicode for source programs is the best solution, but when having to use legacy programming languages in a professional setting, where the use of a custom preprocessor would be frowned upon, using fonts with ligatures is still an improvement over ASCII.
<match target="font">
<test name="family" compare="eq" ignore-blanks="true">
<string>Cascadia Code</string>
</test>
<edit name="fontfeatures" mode="append">
<string>liga off</string>
<string>dlig off</string>
</edit>
</match>
Here is someone disabling ligatures for Noto Sans Mono: https://blahg.josefsipek.net/?p=610[ MAPLE MONO ]
(on Github https://github.com/subframe7536/Maple-font). It has amazing readability, looks nice, is compatible with NF if you use that. I received compliments from people looking over my shoulder for my f'ing font?! Huge shoutout to subframe7536 ^^
This seems bizarre to me, I do not understand the rationale behind it. Can someone enlighten me?
It looks like they naively aligned the slant of the leftmost edge at the mid-height of the glyph, which is not the right way to optically align shapes, especially for a symbol with asymmetric curvature (the leading face of the loop leans substantially more than the trailing face). And then in addition to that, a too-wide arrangement when adjoining ("ul", "ll", etc) causes excess dead space around adjoined pairs.
You see this quite strongly in the "null" that appears on line 5 in their example screenshot. The two "l"s both appear to lean more than the "nu", and the "ul" has more internal space than the "nu", and the "ll" has even more than that.
For more info: https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylis...
< Look at the tasteful colouring. The tasteful thickness of it. Oh my God.
What I noticed while playing was that when fonts are similar, I really pay attention to the rendering of "m" and "r". When they look off, the whole font looks off to me.
It's so good. Perfect even. And they have a really neat customization tool.
I've been using it for a few years now and they actually still occasionally release a new version of it. Haven't gotten tired of it yet.
The only complaint I have about it is that I had to do a hacky workaround to get my Nix setups to pull it in since it's proprietary.
I even forked their "Machine Report" tool (which presumes Debian) to make it work on Linux/NixOS by applying a "polyfill": https://github.com/pmarreck/usgc-machine-report-nixos-editio...
I wonder if it's Stockholm syndrome or if I really do prefer it. It's a totally fine font, I've never felt the need to change it. All the default open source mono fonts seem completely adequate I suppose.
Some fonts are close enough that I don't know if I'd choose one over the other consistently, and I'd be curious to see a percentage score of how much I like a particular font.
Unfortunately, I don't believe there's any established algorithm for how to repeatedly sample pairwise preferences to convert them into a strict ranking, which would ideally be with an active learning component to really drill down into the comparisons that are the closest. Would be a fascinating thing to try to develop, though.
https://www.comicbookfonts.com/Code-Monkey-Variable-font-p/b...
Unfortunately plus signs display as blank spaces in the test drive. Oh well.
It would be nice if it showed you 1st, 2nd, semi-finalist, quarter-finalist...
It would also be nice to see progress of some kind, a few minutes in I was wondering if I was near completion or just getting started.
Though it turns out that VS Code default (Droid Sans Mono) is (to my eye) basically identical to my winner (Roboto Mono), so the exercise was mostly academic.
I came from Fira Code to JetBrains Mono to MonoLisa (several years each) then finally settled on Berkeley Mono and refuse to use anything else!
For coding I much prefer fonts that are bold and easier to read. Who actually likes these whimsical cursive looking comments or super thin looking fonts?
I ended up with "Roboto Mono" btw.
Also, black backgrounds require bolder fonts.
Playing the game gave me Jetbrains Mono though.
I didn't necessarily select the one closest to what I currently use in the game, but more looking at the shapes of different characters to see what looked the "nicest".
https://github.com/ryanoasis/nerd-fonts/tree/master/patched-...
The game certainly needs a progress bar (I tried on iPhone) and option “there’s no chance in world that I will ever use any of proposed options”.
Funny enough I realized that every several years I oscillate between trying to get readable narrow fonts (that brought me to Iosevka) and wide ones (Azeret Mono, anyone?)
Would be nice to be able to play it with my own fonts because some got eliminated purely because 0 (zero) looked like O (letter). Fira Code was a winner only because there weren't paid fonts that I use.
That said, these days I almost exclusively use Input Mono [0], specifically the "Narrow" variety. With an occasional sprinkling of either Iosevka Fixed or PragmataPro Mono.
https://github.com/githubnext/monaspace/blob/main/docs/Textu...
* no <= or === ligatures (i still like to see the separate characters)
* 'i' vs 'l' vs '1' (I now mostly prefer fonts where the lowercase 'l' has the righthand bend on the bottom)
* dotted zero vs slashed zero (i prefer the slashed zero, but dotted is fine as well)
The most shocking revelation that I took from this game is how many coding fonts think it's acceptable to neither slash nor dot their zeroes.
I can't imagine using one of those fonts that leaves 0 and O nearly indistinguishable.
On the game/bracket: it narrowed me down to Noto Sans Mono and I'm honestly not surprised, it's one of the few fonts that comes with my operating system that I find acceptable.
That being said, what I actually have my terminal and Emacs set to is “AcPlus IBM VGA 8x16” from https://int10h.org/oldschool-pc-fonts/. I've always been fond of the VGA font and it tickles all the right usability marks for me.
Don't get old, kids, it sucks.
The semifinals for me with ligatures enabled were Inconsolata vs Cousine, and Nanum Gothic Coding vs Xanh Mono. With ligatures disabled: Xanh Mono vs Nanum Gothic Coding, and Share Tech Mono vs Roboto Mono.
It'd be nice if you could click the various fonts in play at the end, to see them again and compare them against one another. (Regarding comparing images against one another: https://news.ycombinator.com/item?id=46954055) I had specific metrics that I was going for, but sometimes it was marginal.
There's a vector version[2] now too!
[2]: https://github.com/bluescan/proggyfonts/tree/master/ProggyVe...
Unfortunately they seem to have missed it on this page.
This way I can focus on coding and less on tweaking my environment.
I made myself my own pixel-perfect perfect font, more than 10 years ago. I simply copy it from one system to the next one when I upgrade (either the machine or the OS).
It's basically a modified pixel-perfect Terminus font, but with some elements mixed from an old pixel-perfect Monaco font and some modification of mine.
Something I cannot live without is a tall pipe symbol. And my pipe symbol must have a hole in it in the middle (and it cannot be mistaken for an exclamation mark).
I've got the following as a quick test. The reason for a,b,c,e is to verify that <>,{},[], etc. all perfectly align vertically.
Everything is correct, to the pixel.
I don't believe in anti-aliasing for a coding font, not even on a retina display, and I love my 3840x1600 pixels 38" monitor and it's pixel size is perfect to me.
RA $|-sSTtf the little fortran
gqy z2Z s5S 8B CG6 DO uv ;; these should look different (8 / B is difficult to get right)
a!?aA! [a]
b!?b {b}
c?!d (c)
c?c <e>
c!c
if ( a && b || c & d) { [0x88, 0x42, 0xFA, 0xdeadcafebabe]; }
*if ( a && b || c & d) { [0x88, 0x42, 0xFA, 0xdeadcafebabe]; }*
;; found somewhere
lnt foob1x -= {(0)} "'foo'bar";
int foOblx == ((0)) 'foo`bar`' `"':
|nt f0obIx += {{o}} '"O08! LIl1i!!| 7?
the lowercase 's' has a shorter upper bar and the lowercase 'l' is stylised.The thing is: I obsessed for days, creating my own pixel-perfect font. And I don't need to tweak it anymore: it's perfect (to me, YMMV) and I use it ever since.
Can't share it as I reused both Terminus and chars from Monaco.
FWIW I had more than 10/10 eyesight (once you get at 10, there are additional tests) and in my entire life I've never seen one person beat me at the "read sign on the highway". Pixel-perfect font, no AA, custom made font for me. YMMV. Haters gonna hate.
> I don't believe in anti-aliasing for a coding font, not even on a retina display
This is a very good point. As resolution increases, antialiased fonts become less ugly, but also less necessary. Thus at no resolution they make any sense; but they look ridiculous for different reasons.
Fira Code came in second, and that's fair, I've used it on occasion, I like it.
I feel like Chivo Mono[1] would make a decent programming font — if a programming version of it were to exist, anyway.
I also like Go Mono[2], and although they're rather different to what I usually go for, I can see the appeal of the M+ mono[3] fonts.
For those of a more whimsical inclination, Fantasque Sans Mono[4] seems like it might be cool for you.
[1]: https://fonts.google.com/specimen/Chivo+Mono
[2]: https://go.dev/blog/go-fonts
[3]: https://mplusfonts.github.io/
[4]: https://belluzj.github.io/projects/design/fantasquesansmono-...
- An ELO-based version with many more variables, so that I can open the site from time to time and find more nice fonts
- Some global stats
- Not losing the leaderboard after reloading
- Spline Sans Mono
Anecdotal solely to me, very unnerving and even with formatting marks enabled makes me feel uneasy seeing a space without a space formatting mark.
It's amazing to me how many of the fonts in this bracket have lower-case ell and one as nearly identical (both with a line at the base and some protrusion to the left at the top).
On improvement would be to allow scalling different fonts to different sizes. With them all at (e.g.) 16pt, there is a wildly different amount of text on the screen.
I wish the sample text included _underscores_, since I have occasionally found that they disappear with certain combinations of font + size + renderer.
And a run of all the numeric digits 0123456789, to show how their heights align.
And [square brackets], to show how easily they are distinguished from certain other glyphs.
And the vertical | bar, for the same reason.
...
Adobe Source Code Pro and Ubuntu Mono were my finalists. I think my preference would come down to window and font size, since Ubuntu Mono seemed to be narrower and leave more space between lines.
(Also, I kind of rushed the first few comparisons, so it's possible that I prematurely eliminated a typeface that I would have liked more.)
But in general, I think obsessing over the monospace font you use for coding is, ultimately, bike shedding. I've used a lot of different fonts over the year, not because I was trying to find the best one, but because I used the default font of whatever tool I was using at the time, and - guess what - I was fine with it every time.
Plex is a beautiful font, and one of the few corporate fonts that I actually think works, while being recognizable as being IBM.
(FWIW, I just did the codingfont bracket and got Source Code Pro, which I've used in the past, along with Iosevka and Commit Mono)
Also, about half of these fonts look utterly unsuitable for coding to me. Nobody really needs serifs and loopy l's in a coding font, surely?
I remember seeing another font that I liked but I didn't manage to check what font it was before the game showed the winner. Looks like I have to play it again. Not on mobile at least, the webpage was hard to interact on Android Chrome.
Suggestion: I'd like to have an option to exclude fonts without ligatures from the game. And it seems there are others who don't like ligatures who would probably like to be able to exclude fonts with ligatures. You could also do this for other features like serifs.
At the same time, it would be wonderful if window sizes were more consistent (now things are obstructed, with scrolling, etc). And I would love to download the ranking graph!
* https://news.ycombinator.com/item?id=42554715
Results: Roboto Mono !
Reminded me of Sun consoles.
Now I can have side-by-side two editors plus a Structure or Project pane at the left in PyCharm while having 120 chars visible in both editors.
I found this somewhere on the internet. Haven't been able to know what this font is.
I also remember some nice ones designed to look like a smoothed VT-220 one.
But I prefer (and use) PragmataPro (not free) and it is not part of the test, sadly.
Seeing all the fonts listed here it would be great to be able to add user submissions into the mix.
I eventually had to buy one I liked, and non-free fonts won’t ever show up in sites like these.
(It’s called “Codelia” if curious.)
So Aptos Mono or Consolas it is.
Like, some fonts look to weird/unusual that I dislike. But most look just fine and I don't really care.
Am I weird? Do I lack taste?
- Ligatures or not
- *: in the middle (better for things like multiplication), or high (better for things like C pointers)
- Alignment of =, >, - some fonts align -, = and > to that "=>" and "->" look good, others will not, making it arguably look better in isolation, others will optimize for ligatures
- The "i" may look significantly different, some will prioritize consistency, others will prioritize making il1I look distinct. Same idea for 0/O
- Aspect ratio, do you want a wide font, making alignment, indentation, and special characters clearer, or a narrow font, allowing you to cram longer lines into a single screen.
These are compromises, and depending on your style and language, you may prefer one or the other.
My favorites, however, aren't even there.
(Pearl8x8, Spleen, Terminus)
That's the one i have been using for many years, look like i made the right choice
I'm using Liberation Mono, and it's missing :( i got PT Mono though.
[0]: https://www.recursive.design/ and also available on Google Fonts[1]
What I'm missing is DejaVuSansMono which is what I'm using. The result of the test was Ubuntu Mono, which looks okay too.
https://philpl.gumroad.com/l/dank-mono
The one use case I've seen for Dank Mono was presentations with an overhead projector at conferences. The cursive for italics can make some of the structure of the code more differentiated when viewing it at a distance.
I'm disappointed in you today, HN
2. What does "press arrow" do?
3. Do "choose" and "press arrow" do the same or do they do different things?