Skip to content

Fonts fail to load #141

@rctneil

Description

@rctneil

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.')
    })
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions