mooman219 / fontdue

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

Serde feature #55

Closed attackgoat closed 3 years ago

attackgoat commented 3 years ago

This additive serde_derive feature supports the (ubiquitous) Serialize/Deserialize traits.

Aside: I'm pretty sure we could add something like this with the actual serde feature name but it would take reorganizing into a sub-crate and that does not seem worthwhile. The use of serde as a feature name isn't a required community standard. Unfortunately using the hashbrown/serde feature prevents us from using that feature name. I tried using a rename with serde_impl = { .. package = "serde" } but I was unable to make that work with the derive macros, as they directly reference serde as a crate.

attackgoat commented 3 years ago

It took me a long time to get around to integrating this library into my code, and once I did I realized the serde-derive feature didn't provide the expected value. Closing for two reasons:

This still may be valuable for certain fonts and use cases, namely RON format, but it's probably not worth the complication.