aditya_sharma
aditya_sharma

Reputation: 183

Not able to change VS Code Font Family

I am fairly new to VScode, I wanted to add Ubuntu Mono Font in VScode. I downloaded the file from Google Fonts page. I extracted and Installed all the different Styles that were available. Here is a photo of the downloaded fonts that I had installed. enter image description here

Then to verify whether the font was installed or not I opened a word file where I could select Ubuntu Mono. On Stackoverflow I came across 2 methods of Changing the Font family, either editing the settings.json file or using the GUI in VScode by writing the Font family name. I am attaching my modified settings.json file here enter image description here

I tried other options as well like:

   "editor.fontfamily":" 'UbuntuMono-Regular', monospace"
   "editor.fontfamily":" 'UbuntuMono-Bold', monospace"
   "editor.fontfamily":" 'Ubuntu Mono' , monospace"

   //here I tried to play around with spaces:
   "editor.fontfamily":" ' UbuntuMono ', monospace" 

but whatever I do it is showing the same default monospace font. Any Guidance Regarding this will be helpful. My VScode is updated(It shows March 2021 (Version 1.55)) If any more information or Screenshots are required please let me know.

Upvotes: 15

Views: 37526

Answers (4)

duncrtr
duncrtr

Reputation: 1

For anyone else finding this that ran into the same quirk as me: note that if you have entered an invalid font then the setting is not saved. So the editor will not use a fallback font if it was entered at the same time as the invalid font.

Upvotes: 0

Try to disable all installed extensions from vscode and edit the .json file again, choose your font and make sure that it has been installed then save all changes

See how to disable vscode extensions here

Upvotes: 0

SimZhou
SimZhou

Reputation: 555

In my case, I am inputing the font name incorrectly, e.g. I input

'Delugia Mono Regular'

but in fact vscode does not need Regular cause it accepts font family as input, changing it to:

'Delugia Mono'

and it worked.

No need to restart or even save the settings file, the change would appear in 1 second after you've entered a legal fontfamily as input.

Upvotes: 3

rioV8
rioV8

Reputation: 28703

I tried it with the OTF version: UbuntuMono-Regular.otf

Install the font.

The following settings worked.

"editor.fontFamily": "'Ubuntu Mono', monospace"

You have to RESTART VSC

Upvotes: 22

Related Questions