not-fl3 / macroquad

Cross-platform game engine in Rust.
Apache License 2.0
3.2k stars 313 forks source link

StyleBuilder `font` method takes u8 slice instead of Font #672

Open hyperfocusaurus opened 9 months ago

hyperfocusaurus commented 9 months ago

Not sure why this method doesn't take a Font, but presumably fixing it now would be tricky as it would break backwards compatibility.

Is there a scope for adding a new method, which accepts an actual Font rather than a u8 slice? I'm loading and managing my own fonts using a simple asset manager I built, and the Font struct has no way of converting itself back into TTF bytes for loading into a style using a StyleBuilder.

Happy to do the work myself and submit a PR, just let me know which direction is preferred or if this work is not going to be accepted in any form (if there's something I'm missing and there's a good reason for it being the way it is) so I don't waste my time.

cyrgani commented 1 month ago

758 fixes this issue.