Open AmoDinho opened 4 years ago
So it appears that the CSS is importing the fonts but it is not loading.
Hi folks, I've got a component library in React that is not rendering a pair of fonts from Google.
This is how I'm declaring them in my CSS:
@font-face {
font-family: 'Kanit', sans-serif;
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('Kanit Regular'), local('Kanit-Regular'), url(https://fonts.gstatic.com/s/kanit/v5/nKKZ-Go6G5tXcraVGwA.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: 'Rubik Mono One', sans-serif;
font-style: normal;
font-weight: 400;
font-display: swap;
src: local('Rubik Mono One Regular'), local('RubikMonoOne-Regular'), url(https://fonts.gstatic.com/s/rubikmonoone/v8/UqyJK8kPP3hjw6ANTdfRk9YSN983TKU.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
Interestingly enough it shows that it is rendering the font in DevTools but nothing is showing up:
Fonts are not loading when the lib is imported