-
-
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; | |
} |
I believe styles.less is the place for this. "Open Your Stylesheet" will pull that up for you.
Should that just be added at the bottom or should it replace some of the previous text in styles.less?
On OSX+Retina adding this makes fonts look thinner.
It looks odd in Atom (Mac Retina) https://www.dropbox.com/s/6fwgb1wzmncdtli/Screenshot%202015-07-29%2011.16.04.png?dl=0
@hostmaster, try adjusting your font size, I think 15px is the size this font was designed for.
@larsenwork, very cool. Thanks!
@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
Where should this snippet be placed to be effective?