4 ms·
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 judgeme
by hakre 3y ago
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)
- dylanowen 3y agoLigatures don't change the spacing. Those 2 monospaced characters still take up 2 spaces but are rendered as 1 glyph. Your code is still monospaced in all the ways that matter.
- MadcapJake 3y agoAll coding fonts that do this ensure that the ligatures still fit the same width as the characters that are being combined.
- Izkata 3y agoNope, the one a co-worker uses combines >= into the space of 1 character.
- xupybd 3y agoCan't it still be mono space if the ligatures take up the same space as their components?
- hakre 3y agoI 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 https://github.com/tonsky/FiraCode/issues/712
- MadcapJake 3y agoFixed width is what monospace is intended for and ligatures maintain that feature. Nobody would use them if they caused code typesetting issues.
- hakre 3y agoWhether that is considered an issue or not is merely in the eye of the beholder. E.g. a compacting ligature for "www" seems to be welcome in some typefaces for coding. But again, only to stress the reminder: It ain't monospace any longer. We do still may prefer for the typesetting pleasantry that it still is styled as monospace (or fixed width). but those ligatures aren't fixed width any longer as with the letter A, that's all. This is the difference between what it looks like (two or three glyphs) and what it is (a single glyph). So we break monospace to keep it appearing fixed-width even with the ligatures. Would be interesting if there is more typesetting theory about the width of ligatures in a monospace font.
- loup-vaillant 3y agoHere's how monospace ligatures work in real life: the width of a glyph is strictly proportional to how many ASCII bytes it represents. A 1-byte glyph like `m` gets 1 cell. A 2-byte glyph like `->` gets 2 cells. A 3-byte glyph like `===` gets 3 cells. 1 ASCII byte, 1 cell. That way ligatures don't change the width of the original text. If a line used to require 42 columns, it still requires 42 columns. That's why we call them "monospace": each ASCII byte requires the exact same width, even when it's part of a ligature. > a compacting ligature for "www" — Is obviously out of scope. We're discussing monospace ligatures here, not compacting ones.
- amake 3y agoTell me you've never actually used programming ligatures without telling me etc. etc.