Last active
July 15, 2021 14:47
-
-
Save larsenwork/255432b5101093fb07bc to your computer and use it in GitHub Desktop.
The code below enables contextual alternates and ligatures but disables them on your `cursor-line` so you don't sacrifice "editability".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* { | |
-webkit-font-smoothing: antialiased; | |
-webkit-font-feature-settings: "liga" on, "calt" on; | |
} | |
atom-text-editor .cursor-line { | |
-webkit-font-feature-settings: "liga" off, "calt" off; | |
} |
Now that Atom 1.1 is out which officially supports fonts with ligatures, which they recommend enabling as seen below, do we still need to add the CSS seen above?
atom-text-editor {
text-rendering: optimizeLegibility;
}
It appears to still be necessary, but I'm wondering what the difference is, whether there are conflicts, etc.
For versions of atom >= 1.13, the "shadow DOM" is no longer used, so to turn off features for the current line you have to use
atom-text-editor .cursor-line {
-webkit-font-feature-settings: "liga" off, "calt" off;
}
@alflanagan cheers, I've updated the gist
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FWIW, I find the "antialiased" too thin so I commented that out. This lets it revert to subpixel-antialiased.