Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request - support for webfontloader state in Nuxt instance #51

Open
ghost opened this issue Jul 26, 2020 · 3 comments
Open

Feature request - support for webfontloader state in Nuxt instance #51

ghost opened this issue Jul 26, 2020 · 3 comments

Comments

@ghost
Copy link

ghost commented Jul 26, 2020

Would it be possible to somehow pipe the webfontloader state or the event callbacks to the Nuxt instance? In my usecase, I need to run certain visual mechanics right after a webfont has been loaded and rendered on screen. There are workarounds to how I can do it, but I was hoping a systematic solution could come from this module itself.

@ghost ghost closed this as completed Jul 26, 2020
@ghost ghost reopened this Jul 26, 2020
@ghost ghost changed the title Feature request - support for a callback when the font is loaded client side Feature request - support for webfontloader event callbacks in Nuxt instance Jul 26, 2020
@ghost ghost changed the title Feature request - support for webfontloader event callbacks in Nuxt instance Feature request - support for webfontloader state in Nuxt instance Jul 26, 2020
@dblodorn
Copy link

dblodorn commented Feb 9, 2021

Any news on this? @mystrdat how did you find a work around? using webfontloader in vanilla vue i just fire a function once fonts are loaded to indicate that they are loaded int the store.

@ghost
Copy link
Author

ghost commented Feb 9, 2021

I've used a mutationObserver to watch the classes that webfontloader adds to the html element and then I propagate the state through Vuex.

@dblodorn
Copy link

@mystrdat Nice - thanks for the tip! i applied that to my project - works good - although not when publishing as target server, oh well, not ideal, but only matters in production & works there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant