sometimes the google font loads and sometimes it doesn't. I have tried loading the font in the HTML, CSS, as well as the JS. The only one that really worked was the CSS but as I said, when I refresh, sometimes it shows up and sometimes it doesn't.
This sounds like a loading race-condition. I suspect that you're trying to render text in PIXI when the font hasn't completed loading yet.
One suggestion would be to use the document.font.load
API? Currently, it has limited browser support, but helpful for preloading fonts: https://developer.mozilla.org/en-US/docs/Web/API/FontFaceSet/load
Hope that helps.
I use and find https://github.com/bramstein/fontfaceobserver good for font loading.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I use and find https://github.com/bramstein/fontfaceobserver good for font loading.