-
-
Save larsenwork/255432b5101093fb07bc to your computer and use it in GitHub Desktop.
* { | |
-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; | |
} |
@hostmaster, I had the same problem with font size set to 11, I changed it to 12 and now the font looks good.
I modified mine to avoid ligatures in the Find and replace box. Perhaps it can be better refactored.
* {
-webkit-font-smoothing: antialiased;
-webkit-font-feature-settings: "liga" on, "calt" on;
}
atom-text-editor::shadow .cursor-line {
-webkit-font-feature-settings: "liga" off, "calt" off;
}
div.find-and-replace atom-text-editor::shadow .line {
-webkit-font-feature-settings: "liga" off, "calt" off;
}
FWIW, I find the "antialiased" too thin so I commented that out. This lets it revert to subpixel-antialiased.
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
@larsenwork, very cool. Thanks!