▲ 285 ▼ Monaspace - Microsoft presents a new font family for code (monaspace.githubnext.com) submitted 2 years ago by simple@lemm.ee to c/programming@programming.dev 76 comments fedilink hide all child comments
[–] qwertyasdef@programming.dev 19 points 2 years ago (3 children) That texture healing looks super nice. Is that something fonts can just do or does it require special editor support? permalink fedilink source hideshow 6 child comments replies: [–] autokludge@programming.dev 22 points 2 years ago (1 child) It's basically a different type of ligature - it is standard to OTF fonts, but requires ligature support in your editor/terminal. Just need to enable ligatures and/or enable specific ligature sets. See https://github.com/githubnext/monaspace#editors or maybe https://wezfurlong.org/wezterm/config/font-shaping.html for the general procedure in a supporting terminal. permalink fedilink source parent hideshow 2 child comments replies: [–] jeffhykin@lemm.ee 1 point 2 years ago (1 child) Is there a way to disable it but keep ligatures? permalink fedilink source parent hideshow 2 child comments replies: [–] autokludge@programming.dev 2 points 2 years ago (1 child) From https://github.com/githubnext/monaspace#editors : If you want coding ligatures but do not want texture healing, you can omit the calt setting: permalink fedilink source parent hideshow 2 child comments replies: [–] jeffhykin@lemm.ee 1 point 2 years ago Thank you! permalink fedilink source parent [–] Die4Ever@programming.dev 18 points 2 years ago* Texture healing works by finding each pair of adjacent characters where one wants more space, and one has too much. Narrow characters are swapped for ones that cede some of their whitespace, and wider characters are swapped for ones that extend to the very edge of their box. This swapping is powered by an OpenType feature called “contextual alternates,” which is widely supported by both operating systems and browser engines. Contextual alternates are normally used for certain scripts, like Arabic, where the shape of each glyph depends on the surrounding glyphs. And they are also used for cursive handwriting fonts where the stroke of the “pen” might have different connection points across letters. Texture healing is a novel application of this technology to code. basically fonts were already capable of using alternate versions of characters based on their nearby characters, so they used that for these fonts to allow for seemingly-dynamic sizing/spacing permalink fedilink source parent [–] lemmyvore@feddit.nl 8 points 2 years ago (2 children) It's an OpenType standard feature but the font rendering system has to support it and the app has to enable it. The page has a link to instructions for enabling it in VS Code but I have no idea about support status on different OS and desktop environments. I could see it working on webview on Android fwiw, I'm guessing it's either well supported in general or at least by browsers. permalink fedilink source parent hideshow 4 child comments replies: [–] admiralteal@kbin.social 6 points 2 years ago Here is the comprehensive editor compatibility list for Fira Code. Should be the same. permalink fedilink source parent [–] aloso@programming.dev 2 points 2 years ago It is well supported in all browsers and operating systems. At least VS Code and IntelliJ support it, and even some terminals. permalink fedilink source parent
[–] autokludge@programming.dev 22 points 2 years ago (1 child) It's basically a different type of ligature - it is standard to OTF fonts, but requires ligature support in your editor/terminal. Just need to enable ligatures and/or enable specific ligature sets. See https://github.com/githubnext/monaspace#editors or maybe https://wezfurlong.org/wezterm/config/font-shaping.html for the general procedure in a supporting terminal. permalink fedilink source parent hideshow 2 child comments replies: [–] jeffhykin@lemm.ee 1 point 2 years ago (1 child) Is there a way to disable it but keep ligatures? permalink fedilink source parent hideshow 2 child comments replies: [–] autokludge@programming.dev 2 points 2 years ago (1 child) From https://github.com/githubnext/monaspace#editors : If you want coding ligatures but do not want texture healing, you can omit the calt setting: permalink fedilink source parent hideshow 2 child comments replies: [–] jeffhykin@lemm.ee 1 point 2 years ago Thank you! permalink fedilink source parent
[–] jeffhykin@lemm.ee 1 point 2 years ago (1 child) Is there a way to disable it but keep ligatures? permalink fedilink source parent hideshow 2 child comments replies: [–] autokludge@programming.dev 2 points 2 years ago (1 child) From https://github.com/githubnext/monaspace#editors : If you want coding ligatures but do not want texture healing, you can omit the calt setting: permalink fedilink source parent hideshow 2 child comments replies: [–] jeffhykin@lemm.ee 1 point 2 years ago Thank you! permalink fedilink source parent
[–] autokludge@programming.dev 2 points 2 years ago (1 child) From https://github.com/githubnext/monaspace#editors : If you want coding ligatures but do not want texture healing, you can omit the calt setting: permalink fedilink source parent hideshow 2 child comments replies: [–] jeffhykin@lemm.ee 1 point 2 years ago Thank you! permalink fedilink source parent
[–] Die4Ever@programming.dev 18 points 2 years ago* Texture healing works by finding each pair of adjacent characters where one wants more space, and one has too much. Narrow characters are swapped for ones that cede some of their whitespace, and wider characters are swapped for ones that extend to the very edge of their box. This swapping is powered by an OpenType feature called “contextual alternates,” which is widely supported by both operating systems and browser engines. Contextual alternates are normally used for certain scripts, like Arabic, where the shape of each glyph depends on the surrounding glyphs. And they are also used for cursive handwriting fonts where the stroke of the “pen” might have different connection points across letters. Texture healing is a novel application of this technology to code. basically fonts were already capable of using alternate versions of characters based on their nearby characters, so they used that for these fonts to allow for seemingly-dynamic sizing/spacing permalink fedilink source parent
[–] lemmyvore@feddit.nl 8 points 2 years ago (2 children) It's an OpenType standard feature but the font rendering system has to support it and the app has to enable it. The page has a link to instructions for enabling it in VS Code but I have no idea about support status on different OS and desktop environments. I could see it working on webview on Android fwiw, I'm guessing it's either well supported in general or at least by browsers. permalink fedilink source parent hideshow 4 child comments replies: [–] admiralteal@kbin.social 6 points 2 years ago Here is the comprehensive editor compatibility list for Fira Code. Should be the same. permalink fedilink source parent [–] aloso@programming.dev 2 points 2 years ago It is well supported in all browsers and operating systems. At least VS Code and IntelliJ support it, and even some terminals. permalink fedilink source parent
[–] admiralteal@kbin.social 6 points 2 years ago Here is the comprehensive editor compatibility list for Fira Code. Should be the same. permalink fedilink source parent
[–] aloso@programming.dev 2 points 2 years ago It is well supported in all browsers and operating systems. At least VS Code and IntelliJ support it, and even some terminals. permalink fedilink source parent