How to use downloaded fonts in scss?

Viewed 69

I have downloaded the font and now I want use it in my project which I am working. I don't want to use it via @font-face. Is there any way to use it?

1 Answers

You can just do it as in import....I usually have a scss partial containing font imports, like _font.scss and then @import url("https://fonts.googleapis.com/css2?family=Barlow:wght@200;300;400;500&display=swap");

and then reference the font in my _vars.scss and then create variable containing the font family $font-default: "Barlow", "Helvetica Neue", Helvetica, Arial, sans-serif, -apple-system;

and in my main.scss just make sure to call both...

@import "~styles/core_styles/vars"; @import "~styles/core_styles/fonts";

Related