I am trying to use a font that is in a node_module.
My CSS file looks something like this:
@font-face {
font-family: 'OwnLight';
src: url("require('font-database/fonts/Own-Light-Regulat.tff')");
}
I also tried doing these:
@font-face {
font-family: 'OwnLight';
src: url("~font-database/fonts/Own-Light-Regulat.tff");
}
@font-face {
font-family: 'OwnLight';
src: "~font-database/fonts/Own-Light-Regulat.tff";
}
@font-face {
font-family: 'OwnLight';
src: require('font-database/fonts/Own-Light-Regulat.tff');
}
But nothing works.
Also tried appending format("truetype")
on the src
- also to no avail.
Any way I can do this? Thanks!