By default, Vega specifies "sans-serif" as the font family for text in exported SVG files. Also by default, resvg looks for "Arial" as the "sans-serif" font family. When Arial is not available, text will fail to render properly.
This PR embeds the "Liberation Sans" font in the vl-convert-rs crate and uses it as the fallback for "sans-serif" when "Arial" and "Helvetica" are not available. Liberation Sans was chosen because it is very similar to Arial (See comparison at http://www.identifont.com/differences?first=Arial&second=Liberation+Sans&q=Go) and is released under the SIL Open Font License which allows for redistribution. The license text is included in at vl-convert-rs/fonts/liberation-sans/SIL Open Font License.txt.
By default, Vega specifies "sans-serif" as the font family for text in exported SVG files. Also by default, resvg looks for "Arial" as the "sans-serif" font family. When Arial is not available, text will fail to render properly.
This PR embeds the "Liberation Sans" font in the
vl-convert-rs
crate and uses it as the fallback for "sans-serif" when "Arial" and "Helvetica" are not available. Liberation Sans was chosen because it is very similar to Arial (See comparison at http://www.identifont.com/differences?first=Arial&second=Liberation+Sans&q=Go) and is released under the SIL Open Font License which allows for redistribution. The license text is included in atvl-convert-rs/fonts/liberation-sans/SIL Open Font License.txt
.Hat tip to https://github.com/daylinmorgan/okab/issues/1 for the idea!