Open johanhelsing opened 9 months ago
Did this start after 0.9 upgrade? Does it happen at the startup or later?
It happens as i spawn the text. Only tried 0.9
It seems that the root cause is an error with a TTF_ERR_MESHER
error code in https://github.com/fetisov/ttf2mesh library. This happens only on some glyphs/characters on the Playpen Sans font (Bold only). For example, characters "1", "5" and "6" and "9" whereas other digit characters work ok.
I implemented a bit better error reporting at https://github.com/blaind/ttf2mesh-rs/pull/16/files but that doesn't really address the cause.
For bevy_text_mesh
, I think the .unwrap()
/ panic at https://github.com/blaind/bevy_text_mesh/blob/main/src/mesh_data_generator.rs#L95 is not a good behavior. Possibly it should fallback with "?" character generated, and if that does not work then having either an empty space or some generic mesh (e.g. a cube)? Any thoughts on this?
https://github.com/blaind/bevy_text_mesh/blob/677f8f8638a6f5f42982b1dac50fa6c6e01430f5/src/mesh_data_generator.rs#L95
I used the bold version of https://fonts.google.com/specimen/Playpen+Sans/about?preview.text=score%201234