Azizjon
Azizjon

Reputation: 1

How to change VSCode font

I have a problem with VSCode. I don't like that font VSCode is using for system, I don't know how to change VSCode sans-serif(system) font. I tried toggle developer tools, but you know it refreshes all stylesheets when you close/open it. Any solutions?

Upvotes: 0

Views: 18901

Answers (2)

Dinuda Yaggahavita
Dinuda Yaggahavita

Reputation: 990

To change your Visual Studio Code Font:

Navigate

File -> Preferences -> Settings -> Commonly Used

Scroll down to and find Editor: Font Family

enter image description here

The default value should be "Consolas, 'Courier New', monospace" change this with your desired font.

This should automatically change your font in Visual Studio Code

Upvotes: 2

Zosoled
Zosoled

Reputation: 69

  1. Find workbench.desktop.main.css and edit it. The path varies based on your installation.
    • Local: C:\Users\{username}\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench
    • Global: C:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench
  2. Search for the .windows solo class. Ignore entries with multiple classes.
  3. Edit the value for font-family to set the font you want to use.
    • There are two entries for the .windows class. Make sure to edit the one with the font-family property. Ignore the --monaco-monospace-font property.
  4. Keeping the CSS minified, save the file.
  5. Restart VS Code.

Example:

// Original
.windows{font-family:Segoe WPC,Segoe UI,sans-serif;}

// Modified
.windows{font-family:Comic Sans MS,serif;}

Source: https://dev.to/kunaltanwar/how-to-change-vs-code-ui-font-in-windows-56mj

Note: You may need to do this every time VS Code updates since it will be flagged as corrupted. https://code.visualstudio.com/docs/supporting/faq#_installation-appears-to-be-corrupt-unsupported

EDIT: Clarification on which property to target since there are multiple .windows classes.

Upvotes: 1

Related Questions