Customizing Typeface
Guide to include or change typeface (fonts).
1. Linking your Local and Google font in HTML
To include your local font, add your local fonts in app/fonts/typography-font/
directory and link the local font styles containing file (in our case typo.css
) in your HTML
In the same manner, copy your google font linking url and link it in the HTML code.
<!-- Linking Google Font -->
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Poppins:300,400,500,600,700">
Import (Alternate way of linking)
Alternately, you can import your google fonts in both SCSS
and CSS
.
@import url('https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
2. Calling the font family:
The final step of adding or changing your typeface is calling the font family in your stylesheet.
Calling the font family in CSS:
font-family: "Kanit", sans-serif;
Calling the font family in CSS:
Open style.scss
in assets/css/
directory and change the font-family value given in body with your value. Example given below.
body{
font-family: "Kanit", sans-serif;
}