commit-mono icon indicating copy to clipboard operation
commit-mono copied to clipboard

Ligatures that don't merge glyphs together

Open nmsmith opened this issue 1 year ago β€’ 6 comments
trafficstars

TL;DR

It would be nice if arrows were rendered like this:

Screenshot 2024-03-30 at 10 23 28 am

Full motivation

I'm aware the author of this font is not a fan of "coding ligatures" that merge multiple glyphs into one. I find them quite questionable as well. Oftentimes, when programmers ask for ligatures, I suspect what they really want is just to make a sequence of characters look closer to the symbol that they are supposed to represent.

The basic example is the right arrow ->, which is used by many programming languages. In many fonts this character combination looks messy: when interpreted as an arrow, it looks badly-drawn.

Most fonts that support ligatures "fix" this issue by offering a ligature that is basically a stretched version of the β†’ character. The main problem with this solution is that it obscures the identity of the underlying characters; it makes them look like a different character. This is especially confusing for people who are new to programming. (People know how to type - and >, but they don't know how to type an arrow.)

What programmers want is aesthetically-pleasing source code; they don't necessarily want the β†’ character. The 0xProto font achieves the best of both worlds by offering an arrow ligature that still maintains the identity of - and >, yet more closely resembles an arrow. Here are all of the font's ligatures:

I think it would be cool if CommitMono explored this approach. IMO, it achieves a very good balance between aesthetics and simplicity. By that I mean: it would satisfy programmers who want a font with "nice arrows" (etc.), while also avoiding the dishonesty and confusion associated with fonts that merge glyphs together.

nmsmith avatar Apr 04 '24 06:04 nmsmith

Funnily, this was actually how Commit Mono rendered coding ligatures in the early versions, but I changed the rendering to joined symbols due to popular request. Personally, I agree that the integrety of the symbols must always be kept, so the ligatures in Commit Mono are something you switch on intentionally. I doubt I will include an update to mimic the behaviour described above, as I already think symbols like -> in Commit Mono are pleasing without modifications. Hope you understand!

eigilnikolajsen avatar Apr 04 '24 07:04 eigilnikolajsen

Ah ok. That's a shame. IMO more fonts should explore the 0xProto approach. Even Fira Code is backpedalling on their arrow ligatures.

nmsmith avatar Apr 04 '24 07:04 nmsmith

I agree with you, but it seems there's a conflict of interest among developers on this topic.

eigilnikolajsen avatar Apr 04 '24 08:04 eigilnikolajsen

Just to be clear, I wasn't proposing that the joined -> ligature be replaced with a non-joined one. I was merely suggesting that it would be nice to have the non-joined ligatures available via some configuration of the font. πŸ™‚

nmsmith avatar Apr 04 '24 08:04 nmsmith

Yes, I figured haha! Thank you for your interest, I'll see if I can make it a reality at some point.

eigilnikolajsen avatar Apr 04 '24 09:04 eigilnikolajsen

(This is an epic font by the way. It’s the best I’ve ever seen. πŸ‘)

nmsmith avatar Apr 04 '24 09:04 nmsmith