My code is below but the fonts never load. I just get "Bitter failed to load" showing in the console. Is there any reasons that could make this happen. Any suggestions with how to resolve it?
import FontFaceObserver from 'fontfaceobserver'
document.addEventListener("turbolinks:load", function() {
let font = new FontFaceObserver('Bitter', {
weight: 400
})
font.load().then(function () {
console.log('Bitter has loaded.')
}).catch(function () {
console.log('Bitter failed to load.')
})
})
My code is below but the fonts never load. I just get "Bitter failed to load" showing in the console. Is there any reasons that could make this happen. Any suggestions with how to resolve it?