vega / vl-convert

Utilities for converting Vega-Lite specs from the command line and Python
BSD 3-Clause "New" or "Revised" License
84 stars 9 forks source link

Update resvg and svg2pdf, support matching font faces by post script name #170

Closed jonmmease closed 2 weeks ago

jonmmease commented 2 weeks ago

This PR accomplishes several things.

  1. Updates svg2pdf and resvg to the latest versions
  2. Adds a custom usvg "font selector" that understands how to deal with font families that include weight/style info. Like "Matter SemiBold" from #167.
  3. Adds a custom usvg "fallback selector" that knows to skip the "LastResort" font on macOS. This was preventing the selection of the "Apple Color Emoji" font for rendering emoji. This update to resvg now includes support for rendering color emoji to PNG 🎉
  4. Updates PDF export to use the latest svg2pdf, which performs font embedding. I deleted our vl-convert-pdf workaround, which layered embedded text on top of the PDF produced by svg2pdf.

This will close #167, #137, and #147