Live data from Hacker News

Ligatures in programming fonts: hell no (2019)

practicaltypography.com

141–150 of 201 posts

Re: Ligatures in programming fonts: hell no (2019)

#141
post #94
post #87

Earlier quoted context omitted.

Which brings us back to the point of ligatures which are combining so make a single of what is a double or triple and hence no monospace any longer. No judgement if that is good or bad or at all. Just a reminder that it ain't monospace any longer. > Your code is still monospaced in all the ways that matter. Just it ain't monospace any longer. (reminder)

Can't it still be mono space if the ligatures take up the same space as their components?

I think that is a stylistic decision to make it appear as if, but again, this ain't monospace any longer.

In monospace one letter/symbol (printable character) has constant width.

The ligature is one letter/symbol. so while the stylistic decision retains the monospace style of the replaced symbols, the ligature itself is double (or triple) sized compared with other symbols.

IIRC this is commonly called "monospaced ligatures" ref https://github.com/tonsky/FiraCode/issues/712

Re: Ligatures in programming fonts: hell no (2019)

#142
post #25

> Whereas ligatures are going the opposite direction: making distinct characters appear to be others. Yes. On my computer. In my editor. That I am using…because I like ligatures, because they make my code easier to read. For me. Use of ligatures on my setup does not force anyone else to use them? They’re not “viral” like a language feature. “Oh but what if the >= Unicode symbol ends up in your source code and you don…

> Yes. On my computer. In my editor. That I am using…because I like ligatures, because they make my code easier to read. For me. Later in the submission, Butterick addresses this directly, and doesn't disagree: > “What do you mean, it’s not a mat­ter of taste? I like us­ing lig­a­tures when I code.” Great! In so many ways, I don’t care what you do in pri­vate. Al­though I pre­dict you will even­tu­ally burn your­self…

When I check someones your code and edit it, I get plain text - no ligatures, fonts, highlighting, themes, etc are included. I don't know what dev setup forces visual choices on coders, but that sounds like bad idea...

Re: Ligatures in programming fonts: hell no (2019)

#143
post #115
post #74

I initially had this same reaction. Well, perhaps less stridently assembled, but my initial take on it was the same: that ligatures for coding fonts were objectively dumb. But, I was wrong. In several years of using them now, there has never been even one case of the theoretical "mistaking a different glyph that looks similar to the ligature" or "mistaking a ligature character sequence for a single character". It's n…

My takeaway from this article is that I want to go try Fira Code now.

If you bounce off Fira (for whatever reason) also try out JetBrains Mono - incredible font with great ligatures!

Re: Ligatures in programming fonts: hell no (2019)

#144

This reminds me of a struggle I've run into lately. Can anyone recommend a convenient way to identify an individual Unicode character or string of characters? Ideally I'd like to be able to e.g. highlight one of these weird ligatures, or a whitespace that I want to identify, or an emoji my font doesn't support and select something like "identity this character" from the context menu to see what symbol or series of sy…

Open in Emacs, hit `control+h` then `c` with your cursor on the character, it'll show everything you want and more: https://i.imgur.com/X8xp1WS.gif (also shows the decomposition of composed characters so you can discern ä vs ä and emoji combinations)

Re: Ligatures in programming fonts: hell no (2019)

#145
post #115
post #74

I initially had this same reaction. Well, perhaps less stridently assembled, but my initial take on it was the same: that ligatures for coding fonts were objectively dumb. But, I was wrong. In several years of using them now, there has never been even one case of the theoretical "mistaking a different glyph that looks similar to the ligature" or "mistaking a ligature character sequence for a single character". It's n…

My takeaway from this article is that I want to go try Fira Code now.

Try Hack too.

Re: Ligatures in programming fonts: hell no (2019)

#147
post #4

I've witness many a question after/during technical slides where the audience was confused by symbols. At a bare minimum, don't use ligatures in slides or blog posts or anything meant for a broad audience. Ideally, languages would support Unicode as well so you can mean what you say when you type—some folks will naturally prefer this to “keyboard-compatible” options and this should be fine (though ask many non-Anglop…

The initial presentation of Kotlin at Google I/O used fonts with ligatures. As a result, many people in the audience were confused about what the actual syntax of the language was.

I've personally never heard of anyone having a problem with my ligature preferences (other than "they're weird"). People know ≠ and != mean the same thing.

But a presentation introducing syntax? That's just silly. I can't believe someone would get that wrong.

Re: Ligatures in programming fonts: hell no (2019)

#148
post #142
post #25

Earlier quoted context omitted.

> Yes. On my computer. In my editor. That I am using…because I like ligatures, because they make my code easier to read. For me. Later in the submission, Butterick addresses this directly, and doesn't disagree: > “What do you mean, it’s not a mat­ter of taste? I like us­ing lig­a­tures when I code.” Great! In so many ways, I don’t care what you do in pri­vate. Al­though I pre­dict you will even­tu­ally burn your­self…

When I check someones your code and edit it, I get plain text - no ligatures, fonts, highlighting, themes, etc are included. I don't know what dev setup forces visual choices on coders, but that sounds like bad idea...

> ... if you’re prepar­ing your code for oth­ers to read—whether on screen or on pa­per—skip the lig­a­tures.

Here he's referring to code in books, slide decks, and during presentations, not for editing.

Just below the section the above quote is pulled from, Butterick explains

> One in­spi­ra­tion for this piece was the La­TeX crowd, who would rou­tinely write me to in­sist their ty­pog­ra­phy was in­fal­li­ble. And yet. I kept see­ing La­TeX-pre­pared books that in­cor­rectly sub­sti­tuted curly quotes for back­ticks.... “But code sam­ples like these aren’t really am­bigu­ous, be­cause every­one knows that you don’t type the curly quotes.” ... But many of to­day’s pro­gram­ming lan­guages (e.g., Racket) ac­cept UTF-8 in­put.... So am­bi­gu­ity is a real pos­si­bil­ity. Same prob­lem with ligatures.

Re: Ligatures in programming fonts: hell no (2019)

#149
It's interesting that the author is complaining about the readability/usability of ligatures while their site has horrible linking usability. Tiny red superscript circle with zero indication of what text is linking and what size the clickable area of the link is.

Re: Ligatures in programming fonts: hell no (2019)

#150
post #69

A page that does not load any content with disabled JavaScript: hell no I mean am I the only one that is browsing with completely disabled JS by default? :-D More and more sites don't load anything withnout a JS and I'm not talking about advanced apps like Microsoft Office online...

Even worse, the content is right there in the HTML. If you hit the reader mode button, it renders just fine without executing any code.

I wonder why you would self sabotage your website like that.

Post reply on HN