22 comments

[ 2.2 ms ] story [ 39.5 ms ] thread
Were fonts always able to do "texture healing"? Has no one tried this before?
Fonts are software. You can program them such that any two letters beside another can render uniquely. This is most common with ligatures like (e.g. fi -> fi) but also, say, swapping a colon from baseline oriented to centered if between 2 numbers, and so on.

>Has no one tried this before?

This is a great execution of a very common font practice.

i do think that the type designers did incredible work with monaspace… i used to be an Operator-exclusive kind of guy (rip hoefler x frere-jones), but i genuinely think they did enough to completely displace it from my font lexicon, which is no mean feat.
I do like these fonts, but DJR had this idea with the (excellent) Input family of fonts years ago:

https://input.djr.com/

A bit weird to not mention that.

Unfortunately until editors start supporting this (and I’m not sure what would motivate them to), these remain great ideas only.

Input is a proportional font.

Monaspace is a monospace font that uses contextual alternatives: it changes how letters look depending on surrounding letters.

They are nothing alike in their approach to this problem.

(Also this is a marketing piece. Contextual alternatives is not a new tech.)

Honest question: does emacs (GUI) not support this?
Very useful to mix and match various fonts based on semantics. I have a problem with Radon's l though, to me it reads like chumiZy and xenoZith. I don't understand how this could have slipped through, I can't be the only one being constantly confused.
Yeah, I think the italics compounds the problem in their comment example: // Notify aZZ Zisteners
A few people thought this, there's a GitHub ticket for it which they closed after they added a variant in v1.2 for a standard i and a loopy l that you can opt in to use.

Can't quickly find a screenshot though you can use web dev tools to add

   font-feature-settings: "cv10" 1;
To the interactive demo on https://monaspace.githubnext.com
I decided to try using proportional fonts for coding starting a year or two back. It worked out well and I stuck with it, because proportional text is easier for me to read on the whole, and because it allowed more characters to fit comfortably on each line on average. I did find after a while that occasionally the lack of alignment between characters on two subsequent lines was a problem, but then I configured my editor so that it showed comments and text strings in a monospace font and that fixed the problem for me.
This seems a great solution, and I'll definitely be trying it. I feel like monospace fonts are the Roman roads → horse ruts → rail gauge of our industry.
I am curious, which editors allow different typefaces for different code elements? (XCode, I think, but what else?)
I first encountered this in Bjarne Stroustrup's 2000 book, _The C++ Programming Language_. As he notes in the introductory material:

> In code examples, a proportional-width font is used for identifiers. … At first glance, this presentation style will seem “unnatural” to programmers accustomed to seeing code in constant-width fonts. However, proportional-width fonts are generally regarded as better than constant-width fonts for presentation of text. Using a proportional-width font also allows me to present code with fewer illogical line breaks.

I switched years ago and would never go back to monospace.

I edited a proportional for coding, I’ve been using it for 10 years and it’s great except for tabular alignment.

So it would be nice if IDEs rich-rendered regions column aligned.

eg, object literals in JS, in which space separator are as a wide as needed to align the values.

JetBrains MPS has a decision table rendering for DSLs, which is similar to what I described.

I want to use proportional fonts, but the terminal fonts don’t support those font grids well.
When I saw the Monaspace family linked in a HN frontpage some time ago, I installed the whole family, and now my terminal font is Monaspace Neon. I also type my LaTeX code in Monaspace Argon. They won me over Iosevka.
(comment deleted)
I really like Monaspace Argon, but even the narrower option looks too wide on my terminal (kitty on macos)
Finally, a bracket I can enjoy (that doesn't involve basketball).
Not a fan of “texture healing”, a very convoluted and unsatisfying way of fixing a minor problem with monospace fonts, I’d be more interested in seeing letterforms redesigned to be more optically balanced within the grid, another commenter points out ubuntu mono does this somewhat, but I imagine you could make some fairly radical alterations to certain letters and still be legible.
I fell in love with Intel One Mono for this reason