Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use custom font in visual studio code

This isn't so much a coding question as it is about the visual studio code editor. What I want to do is use source code pro in the editor, but I don't know what to change the font setting to. Thanks!

like image 817
thedobbles Avatar asked Jul 24 '15 15:07

thedobbles


People also ask

How do I use Google fonts in Visual Studio code?

go to https://fonts.google.com. select all the fonts you want to use by clicking on the plus button with "select this style". then, at the right side of the screen you can "use on web" click on import. copy the @import line and paste it into your css.


2 Answers

First install the font on your machine if necessary. Then, in your user settings JSON file (File > Preferences > User Settings), override editor.fontFamily like so:

// Place your settings in this file to overwrite the default settings {     "editor.fontFamily": "Source Code Pro" } 

You may need to restart VSCode if it was already open when the font was first installed.

like image 152
Nacimota Avatar answered Sep 22 '22 13:09

Nacimota


As a follow up to Nacimota's answer, to install custom fonts (using Windows 10 the following example) go through the tutorial here.

For me it was a matter of searching for "fonts" from my task bar then clicking the top result. From there I dragged all the files in the "target/TTF" directory, that is generated from following the Source Code Pro tutorial.

like image 37
greg Avatar answered Sep 24 '22 13:09

greg