Home > Software design >  Use Google font in VS Code
Use Google font in VS Code

Time:10-25

I'm just trying to install a font family from Google to use in VS code. I downloaded the zip file and installed it, but am not sure how to actually integrate it in the CSS file. Can someone please walk me through how I can apply this Google font family?

CodePudding user response:

Do you mean using the font in the html? If you mean this, you can use the rule in css:

font-family: the name of the font;

CodePudding user response:

 @import url('https://fonts.googleapis.com/css?family=Muli&display=swap');

This is how you import google font API in your CSS. Then you can simply use that google font by naming it in your CSS file anywhere just like I have named the imported font below.

.body{
 font-family: Muli;
      }

If you'd hadn't imported the file then you couldn't use it.

  • Related