larsenwork / monoid

Customisable coding font with alternates, ligatures and contextual positioning. Crazy crisp at 12px/9pt. http://larsenwork.com/monoid/
7.85k stars 170 forks source link

Language-specific OpenType Feature Names for Programming Ligatures #155

Open be5invis opened 8 years ago

be5invis commented 8 years ago

Given the fact that in different languages, the symbol combination should be combined into a ligature are different, is it possible to provide a language-specific feature name to distinct them? For example, in C++, >>= should not be combined together, and we can assign a feature XCPP to combine >> only. In Haskell, >>= should be combined, and feature XHS_ will be applied. The default calt can be restricted to "most-common" languages only. cf. tonsky/FiraCode#192, atom/atom#11846, Microsoft/vscode#6918, chrissimpkins/Hack#211, larsenwork/monoid#155

larsenwork commented 8 years ago

@be5invis cool idea, I'm not sure editor support is there yet but please enlighten me if they are

be5invis commented 8 years ago

@larsenwork I've experimented a CSS patch to VSCode and it works well: p The style delta is

token.haskell{ font-feature-settings: "XHS_" 1 }