JetBrains / JetBrainsMono

JetBrains Mono – the free and open-source typeface for developers
https://jetbrains.com/mono
SIL Open Font License 1.1
10.86k stars 301 forks source link

Provide left-aligned-ligature variant of the font? #410

Closed andreyorst closed 3 years ago

andreyorst commented 3 years ago

Hi! Not sure how feasible this request is, but I would much appreciate if there also was ligature-left-aligned version of the font. Currently all ligatures are centered in a sense that when ligature uses 2 chars, it is drawn in a way that makes it centered in these two char cells. This looks good in languages with infix notation like Rust:

image

E.g. all ligatures spaced evenly between a and b. But in Lisps this looks a bit out of place:

image

Mainly because open parenthesis preceedes the ligature and there's a weird empty space before it. So if such ligatures were left aligned this would look less foreign here. I must say that I've seen this mostly with these comparison ligatures, as these are pretty regular ones to see in the code, and a lot of other ligatures are not centered, like ~@ or ->> so this is not a huge issue:

image

This mostly occurs when two characters are combined into one symbol which length can't be stretched to fill two chars, e.g. there's no way of making ?. ligature occupy two cells of space without introducing space inbetween, so left aligning such ligatures would be a proper solution for languages with prefix notation.

This is not a painstaking issue, so feel free to close this if such addition is out of scope for this project.

philippnurullin commented 3 years ago

Hi @andreyorst Thanks for the detailed feedback!

If I understand you correctly you suggest shifting all ligatures to the left? There is a potential problem. This shift will create the phantom space after the ligature. And this space will be hard to identify as a part of a ligature itself.

Screenshot 2021-04-08 at 15 23 56

I think this will create a lot of errors in code reading.

andreyorst commented 3 years ago

Ah, I agree, this is not a great outcome. Feel free to close this then