how to use woff2 font in html code example
Example 1: css font face
@font-face {
// Defining what the font will be called
font-family: thisSpecialFont;
// Linking to the font file
src: url(linkToFontFile.woff);
}
body {
font-family: thisSpecialFont;
}
Example 2: If you're trying to use a package make sure that '../../static/fonts/lato/Lato-Regular.woff' is installed. If you're trying to use a local file make sure that the path is correct.
/** Use intstead */
@font-face {
font-family: 'MyFont';
src: local('MyFont'), url(fonts/MyFont.woff) format('woff');
}