daylinmorgan / okab

pip-installable svg/png rendering backend for Vega-Altair
MIT License
4 stars 0 forks source link

Missing system fonts cause png's to be missing text #1

Closed daylinmorgan closed 2 years ago

daylinmorgan commented 2 years ago

Resvg generates a fontdb at runtime. It searches for a font to satisify any styles in the svg. It if can find it one it falls back to it's default font family, if it finds neither then no text is rendered.

This is evident on Google Colab.

The default sans-serif font is Arial.

daylinmorgan commented 2 years ago

We can fix this by shipping the wheel with a backup font(s). Ideally something similar to Arial with an appropriately permissive license.