mooman219 / fontdue

The fastest font renderer in the world, written in pure rust.
Apache License 2.0
1.44k stars 72 forks source link

Add `debug` and `clone` to Font and its types. #56

Closed sanbox-irl closed 3 years ago

sanbox-irl commented 3 years ago

This ended up effecting more types than I initially anticipated, which theoretically has the most minor of effects of compiles times, or binary size, depending on if the impls are used by users.

However, it's just difficult to integrate Font into a larger game engine which assumes that assets will implement Debug.

mooman219 commented 3 years ago

In retrospect, I'm apprehensive about debug: It'll leak internal state that probably should be visible. A manual debug implementation would be the right path over a blanket macro definition.

sanbox-irl commented 3 years ago

Bumped it and added macro support for small and reasonable things which are already available by getters.

Right now, we can't indicate that we didn't debug everything because we don't have finish_non_exhaustive yet (https://github.com/rust-lang/rust/issues/67364) hopefully that gets stabilized soon and this can be made more clear, but this is fine as is I think.

What do you think?

mooman219 commented 3 years ago

This is basically added