Upon attempting to load fonts into the Spectacle boilerplate, I encountered the following error message:
Failed to decode downloaded font: http://localhost:3000/assets/fonts/Overpass-Bold.ttf
OTS parsing error: invalid version tag
I've included a format type and am utilizing a style tag within my HTML file to load the styles.
Thinking it may be related to webpack, I made adjustments in the webpack configuration file as follows:
{
test: /\.ttf$/,
loader: "url-loader?limit=100000&mimetype=application/font-ttf"
}
<style>
@font-face {
font-family: "Bold";
src: url("./assets/fonts/Overpass-Bold.ttf") format('truetype');
}
@font-face {
font-family: "Regular";
src: url("./assets/fonts/Overpass-Regular.ttf") format('truetype');
}
@font-face {
font-family: "Light";
src: url("./assets/fonts/Overpass-Light.ttf") format('truetype');
}
</style>
If anyone could provide guidance on what might be causing this issue and why I'm unable to load the fonts successfully, that would be greatly appreciated.