chalk-diagrams/chalk

Make PyCairo Dependency Optional

srush opened this issue · 1 comments

srush commented

The Cairo API is really nice, but it is a pain to install in many contexts. When working in a notebook, the SVG backend seems fine and has minimal dependencies.

Proposal:

  • Replace the Transformations class with Affine: https://github.com/rasterio/affine
  • Remove all the SVG renderers in transformations.
  • Write converters from Affine to SVG "matrix" and cairo "Matrix"
  • Figure out a better solution for SVG text sizes than calling Cairo.
srush commented

!pip install https://github.com/danoneata/chalk/ now works without dependencies.