-
Notifications
You must be signed in to change notification settings - Fork 29.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to turn off anti-aliasing for editor font. #2577
Comments
VSCode is built on Electron, and the rendering is basically Chromium.
|
Thanks @alexandrudima; I use that rule with the Stylish plugin. Do you where I can set that setting on VSCode? |
At this time, we don't give a straight-forward way to directly customize CSS, neither from an extension nor from a user configuration option. Short of editing the .css files we ship with (and lose the edits on updates) there's nothing I can think of. Even then, I have tried the |
I use VSCode on a mac, and I have to say I much prefer having this as an option rather than not. Is it possible to make it a feature request? |
do the themes have a way to expose this css prop on the |
How do you do that @wprater? |
@ptraceur To set it manually Go to |
@akabiru I see... if I close vscode, it will get as normal again right? Do you have any idea on how to make this permanent? |
@ptraceur Yeah, it's a temporary fix. I'm not sure how to make it permanent at the moment. |
On any "retina" class monitor, the difference this makes is substantial. Please consider adding it as a configuration option. |
Just add an ability to use user.css like in Atom. Then it will be possible to gradually adjust anything. |
@akabiru @rafamds You can make the change permanent by adding |
Remember the scape chars :)
But ye, it works! |
DejaVu Sans Mono appears thinner(editor.fontWeight: normal) and is a workaround if you are ok with that font, atleast until disabling anti-aliasing is implemented(and if you dont want to modify the css/html) |
Apple’s SFMono-Light is another one that is not eye-searingly bold on a Retina screen. I’m using it for now. https://github.com/muhasturk/SFMono |
In case anyone is interested, I created an extension to keep the changes across the updates: https://github.com/ZER0/roughify (mostly for a friend of mine). |
I use the SGI screen font converted to .ttf file for use on OSX. It result looks really nice and crisp in vscode. https://njr.sabi.net/2015/11/01/sgi-screen-fonts-converted-for-os-x/ |
Im still finding myself opening up the developer tools every time to adjust these settings. APIs / editor options would be great, but use controlled CSS could work too. Problem with user css is that if can break other parts of the editor if applied incorrectly. |
From my point of view it should not prevent this feature to be added. Since this tool is aimed on developers and we are able to handle css :) The tool should be as flexible as possible and VSCode is flexible. With one exception. |
Seriously. Please fix the font rendering. Having to paste the In sublime, I use the |
+1 |
Hi! I'm willing to tackle this as i prefer antialiased font as well. However, does anone have thoughts how it should be configured? Is |
@priithaamer I think it should be just |
@priithaamer Excellent. I think another question is which parts of the UI exactly should be affected. Should it be the editor only (source code "words"), or also tooltips, terminal, menus and / or dropdowns? In my personal favour, only the editor and related elements (everything that includes source code - Any other opinions? |
@roman0x58 @kraftwer1 I'd prefer antialias to be applied to entire window on top level. It looks best this way. |
* Add workspace.fontAliasing configuration option Add simple boolean configuration option that controls how fonts are being rendered in workbench. Enabling this option in configuration results with more native feel on macOS. * Add different modes for workbench.fontAliasing Support both additional "antialiased" and "none" methods on font antialiasing. Leaving subpixel-antialiased as default See #2577 * Apply workbench.fontAliasing on document.body Instead of using only workbench element, apply font aliasing setting globally on entire window. See #2577
To verify: On macOS you can now control this via a new setting |
@bpasero should I wait for the new update to have that setting ? |
Should be in the next Insiders build, and then in the next major release. |
Please note that you have all reasons to be disappointed that Thanks for the merge @bpasero |
As for me |
The feature does add the property to the body, which fixes the areas you mentioned. Have you tried it yet? |
Is there anything I can do to achieve a similar result for Windows? Actually, this is currently the reason why I am still using Sublime over VS Code. I am using the |
@Coksnuss Same here! |
@bpasero I confirm that this option works on macOS: |
The merge request #30628 is providing configuration but only for macOS platform. |
@mmarzec I would love to have that option for Windows too. However, I fear that the WebKit engine does not support that possibility at all. Please correct me if I am wrong. |
@Coksnuss I think Atom has options for font anti-aliasing, I'm not sure though. |
I think that "-webkit-font-smoothing" is supported on Windows on Chrome. But in case of no antialiasing there was recently a problem with DirectWrite font rendering in Windows which can't produce non antialiased fonts. The problem came since Chrome version 52 where old GDI font rendering was removed. I am not very familiar how VSC is created but if it is based on Chrome than to have posibility to have non antialiased fonts it will be required to introduce same option of changing "-webkit-font-smoothing" on Windows and also compile Chrome with GDI font rendering possible. |
@priithaamer Are you by any chance working on |
Very annoying to see any font so fat in this editor. |
@kraftwer1 I was working on |
@priithaamer I see. I've just noticed that with the new September release, antialiasing in the built-in terminal doesn't seem to work anymore. |
fontAliasing is not only useful for workspace but pretty much anywhere one can specify a font/size. For example, the built-in terminal, I would prefer Monaco font, size=10, fontAliasing=none because Monaco is designed for that. For editor, another font/size/aliasing. As of 1.17.0 "terminal.integrated.fontAliasing": "none" has no effect on macOS. Also "editor.fontAliasing" has no effect. |
@kraftwer1 @KonaBlend Thanks for reporting this. I will take a look what happened with fontalias setting in terminal. |
What is the way to disable antialiasing in the editor? @bpasero mentions Thanks. |
Thanks for the great product!
Sublime Text allows you to turn off anti-aliasing, which looks great for some fonts:
I've looked around, but there doesn't seem to be an easy way to do this. Is there a way for me to do this in VSCode?
The text was updated successfully, but these errors were encountered: