3 ms·
How do you support ligatures for monospaced fonts?
by jve 7y ago
How do you support ligatures for monospaced fonts?
- lmilcin 7y agoThe same way as in any other font. https://github.com/tonsky/FiraCode https://github.com/tonsky/FiraCode
- Someone 7y agoYou make sure all ligatures have widths that are integral multiples of the standard width. If you’re strict, you make them the same width as the separate characters would be. If you’re less strict, you could, for example, have “⇒” or “½” be one character width, and not 2, respectively 3 (the latter probably would make you give up making a ligature for “1/2”)
- vanderZwan 7y agoMonoid also experimented with using ligatures for better kerning at some point, don't know if it still does that. I thought that was a neat idea, especially since that is kind-of-but-not-really what ligatures are for in the first place. https://larsenwork.com/monoid/ https://larsenwork.com/monoid/