News for hackers. Stuff that matters.
Re:MonoLisa – A font designed for developers by zestyping on Monday February 14, 2022 @05:51PM (#30339526)
Please stop it with the "coding ligatures" already. They are not helpful and only serve to obscure the code being written.

This has got to be one of my least favourite trends in programming aesthetics these days. For a font claiming to "follow function" to devote so much effort to sacrificing function for the _vogue du jour_ is especially rich.

Re:MonoLisa – A font designed for developers by amake on Monday February 14, 2022 @06:24PM (#30339969)
Please stop it with the diatribes about ligatures.

If you don't like them, don't use them. It's that simple.

Other people do like them, and will continue to use and enjoy them.

Re:MonoLisa – A font designed for developers by MikeTheGreat on Monday February 14, 2022 @07:25PM (#30340726)
Serious (if goofy:) ) question: How do I not use them?

My understanding is that if the font has ligatures then the way to not use them is to use a different font (which is fine - there's a lot of fonts out there :) ).

Is that the only way, or is there a way to disable ligatures but keep the rest of the font? Can you disable only some of the ligatures?

TIA!

Re:MonoLisa – A font designed for developers by galkk on Tuesday February 15, 2022 @02:14AM (#30343657)
Literally every IDE that I used has checkbox to disable ligatures. Idea, VS, VSCode. Kitty terminal also has setting to turn them on/off.
Re:MonoLisa – A font designed for developers by henriquecm8 on Monday February 14, 2022 @07:48PM (#30340980)
Ligature is a optional feature, first the editor need to support them, but I guess most editors nowadays already support that. JetBrains IDEs come with JetBrains mono and with ligatures enabled, last time I used VScode I had to enable manually for my new font.
Re:MonoLisa – A font designed for developers by calessian on Monday February 14, 2022 @09:25PM (#30341870)
Some fonts also just have different variants with and without ligatures, for example Cascadia Code/Mono: https://github.com/microsoft/cascadia-code
Re:MonoLisa – A font designed for developers by Aeolun on Monday February 14, 2022 @07:50PM (#30340998)
In JetBrain products: Preferences -> Editor -> Font -> Enable ligatures

So you can turn them off even in fonts that have them, but most fonts have separate versions with and without anyway.

Re:MonoLisa – A font designed for developers by alexvoda on Monday February 14, 2022 @09:10PM (#30341730)
For VS Code see (1) and to selectively disable them (2).

For Atom see (3).

There does not appear to be a way to disable them in Visual Studio.

(1) https://stacksjar.com/post/use-of-font-ligatures-in-vs-code

(2) https://marketplace.visualstudio.com/items?itemName=Coenraad...

(3) https://github.com/tonsky/FiraCode/issues/633

Re:MonoLisa – A font designed for developers by spoiler on Tuesday February 15, 2022 @07:37AM (#30345654)
Ooh the selectively disabled extension is really cool! Thanks!

I sometimes—rarely happens thought—dislike how the cursor renders on top of ligatures in vscode. Always wished it would allow me to "inject" the cursor into the ligature, but since it didn't happen often or bother me as much, I never tried looking for a solution. This will be a small, but much appreciated quality of life improvement! Thanks again!

Re:MonoLisa – A font designed for developers by ReleaseCandidat on Tuesday February 15, 2022 @03:09AM (#30343943)
> Is that the only way, or is there a way to disable ligatures but keep the rest of the font?

It's actually not that easy to use them with for example Emacs where you have to list every combination that you want to 'translate' to a ligature:

https://github.com/mickeynp/ligature.el

Re:MonoLisa – A font designed for developers by kag0 on Monday February 14, 2022 @07:30PM (#30340772)
how to not use them is editor dependent.

but you absolutely don't have to use them.

regular fonts are basically "use this image for 'a', this image for 'e'" etc. ligatures are extra data that says "if you find an 'a' next to an 'e', use this other image in place of the 'a' and 'e' images". but the non-ligature versions of characters are still in the font for use when there is no ligature sequence (just put a space in the middle of any ligature in your editor and you'll still see the independent characters rendered in the font).

Re:MonoLisa – A font designed for developers by melissalobos on Monday February 14, 2022 @11:17PM (#30342721)
I like some like ff, but </ is too far.
Re:MonoLisa – A font designed for developers by kbd on Monday February 14, 2022 @05:57PM (#30339593)
<opinion>They are not helpful and only serve to obscure...</opinion>

Personally -- after originally thinking like you -- I really enjoy ligatures in my code. I disable them for my terminal though.

The same font can work both with and without ligatures, so it's not a negative if a font supports them. You can choose whether to enable them.

Re:MonoLisa – A font designed for developers by taeric on Monday February 14, 2022 @06:02PM (#30339648)
I mean... The existence of ligatures is almost by definition strictly aesthetic. And on that measure, it either brings you a smile to notice that f and i, for example, are joined; or you didn't even notice it.

That is, I won't claim they help readability. But they do make me smile, and don't seem to hurt. (I'm assuming they disappear on copy operations. Mac OS' habit of replacing -- with a longer dash is painful when sending cli arguments.)

Re:MonoLisa – A font designed for developers by dsr_ on Monday February 14, 2022 @07:04PM (#30340500)
There's a third option: "What is that?"

When I'm reading fiction, I generally don't mind ligatures. I find them oppressively obscurantist in any situation where I want to know clearly and distinctly what each character is -- i.e. code and science/math/engineering.

Re:MonoLisa – A font designed for developers by taeric on Monday February 14, 2022 @09:12PM (#30341750)
I'd wager that the vast majority of the time, you just don't notice them.

About the only time they are easily visible is in large type, when they really shouldn't be used.

It's kind of like right justified text. Done well, it shouldn't be noticed how it was done.

Re:MonoLisa – A font designed for developers by dsr_ on Tuesday February 15, 2022 @06:24AM (#30345152)
Please don't tell me what I do and don't see when I just told you what I see and how I feel about it.
Re:MonoLisa – A font designed for developers by taeric on Tuesday February 15, 2022 @10:01AM (#30347311)
Not sure why you are taking offense in that. I wrote that they make me smile. Despite that, I'd also wager that the vast majority of the time, I don't notice them.
Re:MonoLisa – A font designed for developers by lelandfe on Monday February 14, 2022 @06:45PM (#30340256)
Optional part of free thing upsets HN, more at 11
Re:MonoLisa – A font designed for developers by jpambrun on Monday February 14, 2022 @06:57PM (#30340425)
This is actually 100$+.
Re:MonoLisa – A font designed for developers by henriquecm8 on Monday February 14, 2022 @07:50PM (#30341000)
For this font, but there are several other dev fonts with ligatures.
Re:MonoLisa – A font designed for developers by veidr on Monday February 14, 2022 @10:25PM (#30342354)
Just for the record: completely disagree with you, and will never again in my career use a coding font that doesn't support ligatures.

So, YMMV.

Re:MonoLisa – A font designed for developers by bostonsre on Monday February 14, 2022 @06:13PM (#30339808)
Lucky for you, you can disable ligatures or not use a font that you don't like.
Re:MonoLisa – A font designed for developers by EastSmith on Monday February 14, 2022 @06:42PM (#30340213)
How about whoever wants them to enable them?
Re:MonoLisa – A font designed for developers by prmoustache on Tuesday February 15, 2022 @07:54AM (#30345799)
You are taking this backwards.

- there are more fonts without ligatures than there are fonts with ligatures. - every single OS I can think of include by default a monospace font that do not support ligatures. - there are still a huge amount of terminals which do not support them. - for almost any font that has ligature there is a variant without ligature - there is virtually no way to end up with ligatures without actively looking to get ligatures. - any terminal/editor that supports ligature has a setting for that. - most people do actually like ligatures which is the reason they use those editors/terminal/fonts and want those activated by default.

Re:MonoLisa – A font designed for developers by kadoban on Monday February 14, 2022 @08:24PM (#30341321)
That's up to your editor, the font doesn't get to choose what the default is.
Re:MonoLisa – A font designed for developers by eps on Monday February 14, 2022 @06:29PM (#30340036)
You are missing the point.

Presence of ligatures in a "font designed for developers" is neither a plus nor a selling point. It is a pointless embellishment that shows that fonts' authors don't grok the character-oriented nature of computer languages. So them parading ligatures as something desirable only serves to detract from the rest of the font design and to nick their credibility as coding font designers.

Re:MonoLisa – A font designed for developers by hunterb123 on Monday February 14, 2022 @06:35PM (#30340126)
> It is a pointless embellishment

That's like your opinion man.

> So them parading ligatures as something desirable

Others desire them, so they include them. I thank that.

> shows that fonts' authors don't grok the character-oriented nature of computer languages

Nonsense, just an empty insult. I don't think you grok ligatures.

> only serves to detract from the rest of the font design

Your opinion, I believe it enhances the font design.

> to nick their credibility as coding font designers

Another empty insult. Including a feature that people like doesn't hurt their credibility.

See also:

https://www.dictionary.com/browse/subjective

https://www.dictionary.com/browse/opinion

https://www.dictionary.com/browse/aesthetic

Re:MonoLisa – A font designed for developers by michaelcampbell on Monday February 14, 2022 @06:37PM (#30340150)
> fonts' authors don't grok the character-oriented nature of computer languages.

Hogwash. They provided all the characters (which ligatures are also, but you seem bizarrely "against" but "for" the ASCII ones), and ligature-less versions as well. So they grok it at least that far.

Re:MonoLisa – A font designed for developers by the_mitsuhiko on Monday February 14, 2022 @06:32PM (#30340070)
For what it's worth I also have ligatures disabled but I do think it's fair for fonts to include them, particularly because it makes the fonts more versatile in settings where you want them.

In particular when doing presentations having fonts that are capable of producing ligatures in monospace contexts is quite useful.

Re:MonoLisa – A font designed for developers by ctvo on Monday February 14, 2022 @06:38PM (#30340163)
I would concede your point if these folks were trying to sell you a used car.

You don't need to take their word or rely on their credibility for anything. There's a demo right there of the font for you to decide if it's for you or not.

Re:MonoLisa – A font designed for developers by the_other on Tuesday February 15, 2022 @04:26AM (#30344375)
I wonder if there’s a correlation between enthusiasm for ligatures and programming styles or languages.

I want to learn Julia in part because it makes use of “fancy” chatacters (so your math looks like math). I like the more functional JS style, and I’m interested in haskell. And I love ligatures. Anedata of one.

Are you more a C-family person, or an ML-family person?

Re:MonoLisa – A font designed for developers by k3liutZu on Tuesday February 15, 2022 @01:30AM (#30343439)
Why?

I love them ligatures. I'm looking at this code for lots of hours every day. Let me enjoy it via a nice font — with ligatures — if I deem so.

Re:MonoLisa – A font designed for developers by epolanski on Monday February 14, 2022 @06:34PM (#30340107)
You can simply disable them.
Re:MonoLisa – A font designed for developers by sackerhews on Tuesday February 15, 2022 @03:50AM (#30344167)
I kind of agree with you, but I see them authors as avant-garde. Let them be and perhaps something new or an improvement will come out of it for the rest of us.
Re:MonoLisa – A font designed for developers by michaelcampbell on Monday February 14, 2022 @06:35PM (#30340120)
I mean ultimately, all characters are "ligatures", in the sense they are arbitrary squiggles to which we apply meaning.

You seem to have done it well enough with at least 64 of them; maybe closer to 70 since you use _, ., , and ".

Don't let a few more ruin your day. A few more, I might add, that you don't even have to use.

Re:MonoLisa – A font designed for developers by blindmute on Monday February 14, 2022 @08:48PM (#30341534)
A ligature is more functional than not using one. They obscure the code for about 5 seconds the first time you see them, and then never again. After those 5 seconds, you register a new semantic symbol in the brain. It is objectively easier for your brain to parse a single arrow symbol than it is to parse => in a monospace font. For the latter, you are scanning two symbols and only after seeing them both can your brain put them together into a semantic meaning. This is strictly worse than just seeing an arrow symbol and understanding it is an arrow.
Re:MonoLisa – A font designed for developers by ihateolives on Tuesday February 15, 2022 @04:12AM (#30344280)
> It is objectively easier for your brain to parse a single arrow symbol than it is to parse => in a monospace font. For the latter, you are scanning two symbols and only after seeing them both can your brain put them together into a semantic meaning.

Brain is really good in parallel processing of letters/symbols as units. I very much doubt that it's "objectively better". See https://docs.microsoft.com/en-us/typography/develop/word-rec... for overview of the research in this area.

For me the problem with ligatures is not so much of recognizing them but reproducing. I know that for arrow ligature I have to have = and >, but there may be ligatures that I might not be sure of how they're formed. Also, when reading the same code in different environment where the same font is not available I get different visual output where not only is the base shape of the letters different but code units as well. For example three lined equals ligature that some fonts produce. I really hate it.

Re:MonoLisa – A font designed for developers by lmm on Monday February 14, 2022 @09:08PM (#30341716)
If your programming language wants to use an ⇒ symbol there's a perfectly good codepoint for that already. I don't want complexity to be hiding in my font where I would never even think to look for it. (For example imagine searching the documentation to understand a use of ⇒ and finding it doesn't exist in your programming language)
Re:MonoLisa – A font designed for developers by blindmute on Monday February 14, 2022 @09:36PM (#30341962)
My programming language doesn't want to use it; I do. If you would "never even think" to realize that ⇒ in your editor is actually =>, after having installed a programming ligature font where that is always advertised, that's on you. And any developer should already be well aware that no common language uses symbols beyond ASCII, so seeing ⇒ should be clear enough already that it's a ligature. I really think this 'confusion' argument is made up and has never actually occurred for more than 5 seconds.

Semantically, the language would like to use a ⇒, because it's representing the idea of an arrow. It's only due to keyboard constraints that it has use use =>. Parsers (and our brain is also a parser) would be much easier to implement if meaning didn't have to derive from symbol combinations like =>, !==, <!--. The input interface is limited to ascii to represent meaning, but our eyes don't need to be.

Re:MonoLisa – A font designed for developers by lmm on Monday February 14, 2022 @09:44PM (#30342011)
> If you would "never even think" to realize that ⇒ in your editor is actually =>, after having installed a programming ligature font where that is always advertised, that's on you.

Sounds like we agree that a font that does this should never be a default. I don't think customized environments to the extent that one developer sees a different view of the code from another are a good idea (partly because I think reviewing and pair-programming are very valuable), but I guess if you want to set up something like that it's fine as long as you're not pushing it on anyone else.

> And any developer should already be well aware that no common language uses symbols beyond ASCII, so seeing ⇒ should be clear enough already that it's a ligature.

I've been using ⇒ in Scala for over a decade, shrug.

Re:MonoLisa – A font designed for developers by blindmute on Monday February 14, 2022 @10:42PM (#30342485)
I agree it should not be a default. I think much like using the keyboard to navigate the IDE, it's something you can do that brings a benefit once you're familiar with the basics. I don't think vim should be the default terminal editor for the same reason, but I still think vim is worthwhile to use.
Re:MonoLisa – A font designed for developers by thayne on Monday February 14, 2022 @10:51PM (#30342571)
> no common language uses symbols beyond ASCII,

Ruby and scala allow using such characters, and there are libraries that use it. Julia actually has special characters in the standard library, although afaik they all have ascii aliases. The repl and many editor plugins support expanding tex style escapes to those special characters.

Re:MonoLisa – A font designed for developers by FridgeSeal on Tuesday February 15, 2022 @12:41AM (#30343221)
I use Fira code, and the ligatures for >=, <=, !=, ==, and -> make it so much faster and easier to identify the symbols.

I wouldn’t know where to get the “⇒” codepoint, and getting is probably more effort than just writing “==>” with the added benefit of my teammates not having to use the ligature (or figure out the symbol) if they don’t want to either.

Re:MonoLisa – A font designed for developers by smoldesu on Monday February 14, 2022 @09:05PM (#30341689)
If this wasn't a discussion about monospace fonts, I might be inclined to agree with you. However, I kinda agree with the detractors here; ligatures objectively defeat the purpose of equally-spaced characters. The purpose of monospace fonts is to provide definitive clarity where sans and serif fonts fail to do so. In the world of programming, maintaining that consistency is essential. Having one symbol span several spaces undermines that clarity, you may as well be reading your code with Helvetica at that point. I understand that programming is a career path filled with creature comforts and obscure little things that make you happy; I even enjoy the warp cursor (gasp!) in VS Code, which definitely doesn't contribute to clarity. Let's stop treating ligatures like a direct upgrade over normally printed monospace, though. It's an option, one that shouldn't come enabled by default but one that should be available for people who want them for whatever reason.
Re:MonoLisa – A font designed for developers by blindmute on Monday February 14, 2022 @09:51PM (#30342075)
Monospace fonts are used mainly because vertical alignment is desirable, and because characters such as ! and . are too narrow to easily read in proportional fonts. Monospace, then, improves clarity. Turning a => into a ⇒ does not affect the vertical alignment nor make anything too narrow to read. It just turns a combination of symbols into its semantic meaning. It allows you to parse a meaningful glyph rather than using a hacky workaround to represent meaning via ascii. This is also the point of emojis: (-_-) is fine, but most people find <expressionless face emoji> to be more clear as to the meaning. Nobody is getting confused about what these ligatures mean. They installed the fonts and selected the fonts in their IDE; they have already been coding; they are not going to see ⇒ where a => used to be and have a brain meltdown.
Re:MonoLisa – A font designed for developers by k_sze on Tuesday February 15, 2022 @06:11AM (#30345058)
Is ligature rendering context-sensitive? If I put => in a string literal in JavaScript/TypeScript and the IDE "helpfully" decides to apply ligature to it, I'm gonna go insane.