Feature idea: add fallback fonts automatically
Followup for #308 and #298
The idea is to explore using an advanced text engine like Pango or Cosmic Text to determine fallback fonts for the entered text, these could be used for femtovg rendering.
Femtovg itself considers fallback fonts, but it depends on which fonts have been added. https://github.com/femtovg/femtovg/blob/master/examples/text.rs
While #298 provides a configuration option for this, the convenience isn't great.
https://docs.gtk.org/Pango/method.Fontset.get_font.html https://github.com/femtovg/femtovg/blob/master/examples/external_text.rs
An important point, next to convenience, should be performance. The font loading mechanism shouldn't lead to additional sluggishness.
Just a thought: we could also consider contributing to femtovg, if thats a better place for these things... afterall we could give something back!
Sure, when we get to that point, we can ask. But since the external text example does make use of cosmic_text, I'm not sure if the project will want to have any more sophisticated fallback font loading. I'm personally not sure if I'll ever have the knowledge of making this super useful, then again, it can probably be researched in both the above.
Also, different thought, we're already using fontconfig, I think we may even be able to get fallback fonts that way.