3 ms·
This is ingenious! If anybody is curious at to how this works, they use a feature in OpenType (the most common format for modern fonts and the basis for WOFF a
by johncolanduoni 10y ago
This is ingenious!
If anybody is curious at to how this works, they use a feature in OpenType (the most common format for modern fonts and the basis for WOFF and EOT) called glyph substitution. It's designed to combine adjacent characters for ligatures and the like. It lets you specify that some arrangement of characters should be replaced by an alternate glyph.
- Svip 10y agoA more interesting usage of this feature is Hasklig: https://github.com/i-tu/Hasklig/ https://github.com/i-tu/Hasklig/ A monospaced fontface for Haskell, where the operators are presented as ligatures. If only it also included operators from other languages.
- crummy 10y agoFira Code Pro does: https://github.com/tonsky/FiraCode https://github.com/tonsky/FiraCode
- Latty 10y agoYou might want to check out Monoid which is similar (and my personal favourite coding font): http://larsenwork.com/monoid/ http://larsenwork.com/monoid/ Optionally, it also supports rendering fontawesome icon names (fa-...) as icons too, which is another hack along the same lines.
- noir_lord 10y agoPragmatic Pro does it as well and it works in intellij really well.
- whoopdedo 10y agoI'd like ligatures in coding fonts more if they also collapsed to a single (or double at most) character cell.
- pklausler 10y agoYou must be too young to have used APL.
- drinchev 10y agoIt is exactly how fonts like "Ligature Symbols" [1] and "Mono Social Icons Font" [2] works. 1 : http://kudakurage.com/ligature_symbols/ http://kudakurage.com/ligature_symbols/ 2 : http://drinchev.github.io/monosocialiconsfont/ http://drinchev.github.io/monosocialiconsfont/
- jamessb 10y agoThis is also done by Project Seen [0,1] and sans bullshit sans [2]. [0]: https://news.ycombinator.com/item?id=9783275 https://news.ycombinator.com/item?id=9783275 [1]: http://projectseen.com/ http://projectseen.com/ [2]: https://pixelambacht.nl/2015/sans-bullshit-sans/ https://pixelambacht.nl/2015/sans-bullshit-sans/