Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable anti-aliasing in VisualStudio Code?

I disable anti-aliasing in TextMate. Here is a sample screenshot:

enter image description here

Here is the default in Visual Studio Code:

enter image description here

How can I disable anti-aliasing (font smoothing) in Visual Studio Code?

like image 901
ohho Avatar asked Jun 08 '16 02:06

ohho


2 Answers

This is what works for me on Ubuntu.

Step 1. Create file ~/.config/fontconfig/fonts.conf, if it doesn't exist.

Step 2. Add this (or update accordingly, if the file already exists):

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--ANTIALIAS--><match target="font">
<edit name="antialias" mode="assign"><bool>false</bool></edit>
</match>
</fontconfig>

Note: this will affect all Chromium-based applications (which includes Electron applications).

like image 80
user38329 Avatar answered Nov 11 '22 01:11

user38329


I couldn't do this though VSCode itself (as it told me workbench.fontAliasing was not a valid setting), however I could apply it system-wide on my Linux machine, by adding this to a file like /etc/fonts/conf.d/99-example.conf:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
<fontconfig>
  <match target="font">
    <test name="family" compare="eq" ignore-blanks="true">
      <string>Monoid</string>
    </test>
    <edit name="antialias" mode="assign">
      <bool>false</bool>
    </edit>
  </match>
</fontconfig>

Change Monoid to the name of the font you do not want to antialias in any program.

Restarting VSCode after creating the file resulted in no antialiasing for that font.

like image 38
Malvineous Avatar answered Nov 11 '22 01:11

Malvineous