-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Download Font [ XXX_LABEL] failed, using Arial or system default font instead #17778
Comments
the net was timeout or the resource did not exist |
No network timeout. TTF files are downloaded successfully with (200 OK response).
Suspect it take longer time than 3 seconds. Haven't finished loaded the font, already go into the following line
|
2.4.13 did not support the reject(Promise) |
我觉得 不关 reject promise 的事, 应该是可以运行的 ttf 文件 是下载成功了 可是我觉得在加载font的时候,需要更长的时间(需要大于3秒) 我怀疑它还没完成加载font就被强制timeout,导致font出现问题 我自己尝试了 把3秒换成 60秒, 再也没遇到这个问题 |
My tester has also found this bug when playing on slow internet. Even when the font is loaded it is not used properly. I would love to be able to change |
加了promise也是可以运行的,但是不支持异步,会直接执行后面的代码,而异步的还在执行中,导致问题 |
你可以尝试不使用then函数,应该会正常 |
也许是我说错了,我认为Promise.then()是不可靠的 |
Cocos Creator version
2.4.13
System information
Windows 10, Android, IOS browsers (Web Mobile)
Issue description
Sometimes might get this error "Download Font [ XXX_LABEL] failed, using Arial or system default font instead". Mostly happens on first time launch the website.
Found the solution that can solve this problem by increasing the _timeout from font_loader.js.
After updated _timeout from 3s to 60s, have tested on windows 10, android, and ios devices, so far so good.
Suspect that require more time to load the font.
Recommend to make the timeout variable as global variable. So we can adjust ourselves based on our needs.
Hope someone can be updated for next v2 release. Thankss
Relevant error log output
Download Font [ XXX_LABEL] failed, using Arial or system default font instead
Steps to reproduce
Get any ttf files with chinese fonts.
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: