customize vscode font in debian linux

INSTALL FONTS ON DEBIAN LINUX

We can install True Type or Open Type fonts(.ttf / .otf / .ttc) in DEBIAN LINUX, like ubuntu or kali.

DOWNLOAD FONT FROM WEBSITE

  1. Download Cascadia Code from https://github.com/microsoft/cascadia-code/releases and unzip it.
  2. We got 3 folders here: /otf/ , /ttf/ and woff2 , and we only need `ttf

COPY FILES TO SYSTEM FONT DIRECTORY

Font fils are generally installed in either the system font directory on the path /usr/share/fonts/ or in a user font directory that is frequently on one of the following paths:

  • ~/.local/share/fonts/
  • ~/usr/local/share/fonts/
  1. Execute the following command to copy the fonts to system path
1
sudo cp -r ttf /usr/share/fonts/CascadiaCode

GENERATE FONT CHACHE

We need to build font infomation caches for apps using fontconfig for their font handling.

1
2
cd /usr/share/fonts/CascadiaCode
fc-cache -f -v

NOTE

If you cannot execute fc-cache command , copy and execute the following command in terminal.

1
sudo apt install fontconfig

VERIFY THE FONT INSTALLATION

Confirm that the fonts are installed by displaying the paths and style definitions with fc-list command filtered on the font family name with grep .

1
fc-list | grep "Cascadia Code"

CUSTOMIZE VSCODE

  1. Get to Setting
image-20220122161611892
  1. Search font in the bar
image-20220122161750043
  1. Add 'Cascadia Code', to the Editor: Font Family .
  2. Restart vscode.