-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Chinese fonts #112
Comments
This is probably a result of the "root" asset path changing based on the context. If you "cargo run" it will use the cargo workspace as the root folder. if you run a binary, it will use the binary's parent folder as the root. Just copy the asset folder to live next to the binary. (sorry this behavior isn't documented yet)
If you fix the "asset folder" issue and fonts still don't load, can you send me the fonts so I can test them? |
|
hmm seems like a pretty nasty timing issue. we should fix this asap. |
I just hit this error again on my computer. This is 100% a timing issue where we aren't being forgiving of fonts that are still loading. I think we can fix this pretty easily. |
Also just ran into this when trying to run any of the bevy_rapier (https://github.com/dimforge/bevy_rapier) examples. They don't seem to contain any chinese fonts though. I'm on MacOS and here's a log, if that helps crash
|
Fixed by #490 |
I used a custom font (which supports Chinese characters) to build the button example.
If I cargo run from IDE, no error will occur. And if I run the target exe directly from the target-dir, the following error occurred:
thread '' panicked at 'called
Option::unwrap()
on aNone
value', crates\bevy_text\src\font_atlas_set.rs:53:20I tried other Chinese fonts, they all worked fine in most cases. And I guess it was just due to that specific font, which was a home-made one.
So two questions:
The text was updated successfully, but these errors were encountered: