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

unreliable font #3438

Closed
courtneyvigo opened this issue Dec 9, 2016 · 3 comments
Closed

unreliable font #3438

courtneyvigo opened this issue Dec 9, 2016 · 3 comments
Labels
🤔 Question User question, similar to Help Wanted or Needs Help. These can be addressed whenever someone has tim

Comments

@courtneyvigo
Copy link

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.

@bigtimebuddy
Copy link
Member

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.

@bigtimebuddy bigtimebuddy added Plugin: Text 🤔 Question User question, similar to Help Wanted or Needs Help. These can be addressed whenever someone has tim labels Dec 10, 2016
@themoonrat
Copy link
Member

I use and find https://github.com/bramstein/fontfaceobserver good for font loading.

@lock
Copy link

lock bot commented Feb 24, 2019

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.

@lock lock bot locked and limited conversation to collaborators Feb 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🤔 Question User question, similar to Help Wanted or Needs Help. These can be addressed whenever someone has tim
Projects
None yet
Development

No branches or pull requests

3 participants