Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Google Font loader reports loading of font as failed even if the fonts is loaded correctly #67

Closed
nicoladj77 opened this Issue Nov 20, 2012 · 2 comments

Comments

Projects
None yet
2 participants

I'm having this strange issue. I'm loading fonts with google font loader.

    var data = {
        active: call_resize,
        fontactive: bum,
        fontinactive: bam,
        custom : {
            families : [ 'League Gothic', 'FontAwesome' ],
            urls : [
                    'http://localhost/wordpress/wp-content/themes-ai1ec/vortex/less/bootstrap/font-awesome.css',
                    'http://localhost/wordpress/wp-content/themes-ai1ec/vortex/less/bootstrap/font-league-gothic.css'
                    ]
        }
    };
    require(
        [ 'http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js' ],
        function(  ) {
            WebFont.load(data);
        } );

Basically the two fonts are loaded correctly but the font loader report the second font as not being loaded correctly while this is not true as you can see from the image.

fonts

this is really tedious because i need to performa an action when all fonts are loaded and now Firefox and chrome are waiting for the failure before calling the "active" handler.

Owner

bramstein commented Nov 21, 2012

I confirmed this problem, it looks like a bug in the detection code. The good news is that I tried with the changes in #66, and it works as expected there. The plan is to merge in these changes, and do a new release very soon.

Yes i confirm that with that pull request everything works for me, i'm using that code.

@nicoladj77 nicoladj77 closed this Nov 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment