News for hackers. Stuff that matters.
Re:Monocraft: A programming font based on the typeface used ... by arthurcolle on Tuesday September 06, 2022 @07:46PM (#32744628)
Ligatures are amazing, I don't understand why anyone would like ascii "compound versions" of a set of symbols when there are thousands if not many hundreds of thousands of great symbols that were used in older typographic settings that are available for usage.
Re:Monocraft: A programming font based on the typeface used ... by bobbylarrybobby on Tuesday September 06, 2022 @08:35PM (#32744970)
A few reasons I don't like ligatures when coding:

- It makes me have to think too hard to figure out where the boundaries actually lie between characters when I want to edit. I don't want to think about how many times I'll have to press backspace to delete a single "character"; without ligatures, I don't have to think at all. - With ligatures enabled, I have to remember how to type each character-group (e.g., that != is the same as slashed equals). With ligatures disabled, I can just read it back from an existing example. In other words, ligatures create a separation between what I type and what I see. - It makes it hard to quickly compare my code to examples online that don't use the ligatures because, again, I'm forced to translate between what's on my screen and what's in the file.

The only ligatures I appreciate are minor stylistic ones, e.g., raising a colon slightly before a number, adjusting the spacing between two consecutive colons, raising two consecutive asterisks, etc. Changes that don't fundamentally change the code appears but make it a teensy bit more aesthetically pleasing.

Re:Monocraft: A programming font based on the typeface used ... by IgorPartola on Wednesday September 07, 2022 @12:40AM (#32746373)
I am with you. When you are inverting your logic and need to delete the ! out of != but you have the ligature version you are prone to making a mistake. Best case, you notice it. Worst case you don’t and create a subtle bug.
Re:Monocraft: A programming font based on the typeface used ... by WastingMyTime89 on Wednesday September 07, 2022 @12:49AM (#32746428)
How would you make a subtle mistake while turning != into = due to ligatures?
Re:Monocraft: A programming font based on the typeface used ... by pluijzer on Wednesday September 07, 2022 @07:39AM (#32749284)
var a, b = true; if (a!=b) console.assert(false, "unreachable");
Re:Monocraft: A programming font based on the typeface used ... by leshenka on Wednesday September 07, 2022 @10:39AM (#32751254)
just aim for the middle of the "=/=". Click right where the vertical line is
Re:Monocraft: A programming font based on the typeface used ... by freeCandy on Wednesday September 07, 2022 @12:28AM (#32746310)
Your last point on minor changes make a lot of sense. Are there any fonts that do this?
Re:Monocraft: A programming font based on the typeface used ... by bobbylarrybobby on Wednesday September 07, 2022 @12:47AM (#32746414)
I use Iosevka with just the "kern-dotty" ligatures enabled.
Re:Monocraft: A programming font based on the typeface used ... by lifthrasiir on Tuesday September 06, 2022 @11:34PM (#32746064)
Ligatures obscure the underlying text, which is a problem when you actually edit it. It is okay to have light ligatures where the original text is retained but refined in style but many fonts with ligatures do too much [1], like rendering `!==` as two lines and a slashed stroke in between (come on, who on earth did think this is a good idea???). I would rather have a Unicode symbol support and automatic symbol substitution instead.

[1] https://pbs.twimg.com/media/DKE2QBSUQAEv_dQ.jpg

Re:Monocraft: A programming font based on the typeface used ... by spicybright on Wednesday September 07, 2022 @04:43PM (#32756546)
Because people can have preferences to make things work better for them, and there's nothing wrong with that.

Software engineering is one of the few professions where you can use a hammer you designed yourself that fits your hand perfectly and is optimal for the task at hand.

Changes like this don't mean you're forcing other people to use your weird shaped nails, tho.

Re:Monocraft: A programming font based on the typeface used ... by lifthrasiir on Thursday September 08, 2022 @04:38AM (#32762927)
Of course. You can use Comic Sans for programming or whatnot if you really want (and there is actually a good reason, including dyslexia). But it is generally frowned upon because the font was never designed for that purpose and its use mostly indicates that the user is clueless about typography. Likewise excessive ligatures have their places, but there is a good reason to avoid them when you frequently have to edit them.
Re:Monocraft: A programming font based on the typeface used ... by d_tr on Wednesday September 07, 2022 @06:14AM (#32748736)
I am not a fan of ligatures either. The "compose" key would be another option to insert various Unicode glyphs and it exists already.

Unfortunately, with monospace fonts many of these glyphs do not look nice to me due to the width constraint. Maybe a "multispace" font would be nicer while still preserving the grid alignment.

Re:Monocraft: A programming font based on the typeface used ... by WastingMyTime89 on Wednesday September 07, 2022 @12:53AM (#32746447)
> come on, who on earth did think this is a good idea???

Me. It’s the 21th century. It’s bad enough I have to use monospaced fonts because people can’t properly tabulate. I will at least have proper symbols rather than weird combination of glyphes.

Re:Monocraft: A programming font based on the typeface used ... by lifthrasiir on Wednesday September 07, 2022 @01:01AM (#32746512)
I too want proper symbols, but not ASCII approximations disguised by inconsistent ligatures.
Re:Monocraft: A programming font based on the typeface used ... by WastingMyTime89 on Wednesday September 07, 2022 @01:11AM (#32746577)
Writing my previous comment, it suddenly downed on me that I could actually be using a proportional font with ligatures and things would look even better. I need to try.
Re:Monocraft: A programming font based on the typeface used ... by madeofpalk on Wednesday September 07, 2022 @08:54AM (#32749911)
You don't have to use a monospace font to write code.
Re:Monocraft: A programming font based on the typeface used ... by spicybright on Tuesday September 06, 2022 @11:35PM (#32746069)
My view: Because languages are defined as those symbols, so why obfuscate it? It would be like collapsing the letters "ch" in english to a new symbol because it's a digraph.
Re:Monocraft: A programming font based on the typeface used ... by piperswe on Wednesday September 07, 2022 @12:13AM (#32746233)
Isn't combining letters in natural language the original purpose of ligatures?
Re:Monocraft: A programming font based on the typeface used ... by bobbylarrybobby on Wednesday September 07, 2022 @12:52AM (#32746439)
I think the original purpose was to clean up typography so that e.g., "fi" didn't look too cramped.
Re:Monocraft: A programming font based on the typeface used ... by nerdponx on Tuesday September 06, 2022 @09:33PM (#32745383)
I personally like font ligatures, but I'd much rather have true Unicode "synonyms". E.g why shouldn't `!=` and `≠` be synonymous tokens?
Re:Monocraft: A programming font based on the typeface used ... by phinnaeus on Tuesday September 06, 2022 @10:11PM (#32745622)
This would have to be at the language level, surely. Even comparing "case" is filled with weird complexity, comparing equality in this way seems fraught.
Re:Monocraft: A programming font based on the typeface used ... by iamevn on Tuesday September 06, 2022 @10:23PM (#32745670)
Absolutely, my ideal would be for the canonical form in the codebase to just be the abstract token. It would have one or more possible names stored in the codebase. Then each developer would be able to choose the names they'd prefer to see and type in their editors. (Decoupling the name of a code unit from the actual reference to/implementation of it is one of the things I'm really excited about in the Unison programming language.)
Re:Monocraft: A programming font based on the typeface used ... by spicybright on Wednesday September 07, 2022 @04:45PM (#32756571)
That would make it extremely difficult to talk to anyone else about the code though, no?

You'd have to spend time finding and learning the "common" ground between every fellow developer you talk to.

Re:Monocraft: A programming font based on the typeface used ... by tonmoy on Tuesday September 06, 2022 @11:36PM (#32746078)
There could be non-programming use cases where one might need to use != instead of ≠
Re:Monocraft: A programming font based on the typeface used ... by MH15 on Wednesday September 07, 2022 @12:27AM (#32746307)
Luckily as programmers we can each use a different configuration- I just spent two hours at work trying to get my ligature fonts to show up in a hosted VSCode instance.