Font-face not woking a custom font on sapper?
Font is loaded, but not show..
`@font-face {
font-family: Baske;
src: url("fonts/BASKE1.ttf") format('truetype');
}
body {
font-family: Baske, Arial !important;
}`
Please follow the issue template and provide a repro.
Just a comment on that, to help anyone that got stuck (me) trying to figure out how to use locally hosted fonts.
In the context of @font-face in an css, scss, sass file. Toke me a while to figure out that in the src: url(): fonts/ or ./fonts/ will not work because it will be resolved relative to client.js and not to static folder defined in server.js. To make it work just do /fonts/ and it will be resolved to the static folder.
./path/to/myfontpath/to/myfont/path/to/myfont
Most helpful comment
Just a comment on that, to help anyone that got stuck (me) trying to figure out how to use locally hosted fonts.
In the context of
@font-facein an css, scss, sass file. Toke me a while to figure out that in thesrc: url():fonts/or./fonts/will not work because it will be resolved relative toclient.jsand not tostaticfolder defined inserver.js. To make it work just do/fonts/and it will be resolved to thestaticfolder../path/to/myfontpath/to/myfont/path/to/myfont