tdewolff/canvas: vector graphics in Go (mayor update)

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • canvas

    Cairo in Go: vector to raster, SVG, PDF, EPS, WASM, OpenGL, Gio, etc. (by tdewolff)

    I see, you'd like to specify the exact output pixel size for the rasterizers? To be honest, the floats are being multiplied and rounded, so given a set of canvas dimensions in mm and a DPMM should be fine in your case. In any case, I've opened an issue to calculate the resulting DPMM automatically to get a certain pixel width and height: https://github.com/tdewolff/canvas/issues/78

  • bella

    Bella renders text to graphics and prints it on a label maker using IPP/CUPS. (by tv42)

    E.g. for text rendering, I find the largest font size that still renders inside that constraint. https://github.com/tv42/bella/blob/42d81584a247a38647c3ccc63e58b50e1c00e444/internal/render/render.go#L118 and https://github.com/tv42/bella/blob/42d81584a247a38647c3ccc63e58b50e1c00e444/internal/render/binsearch.go -- note I'm doing the scaling with the font renderer, not by resizing the output of whatever it renders, because different sizes get different hinting.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • gofpdf

    draw2d's PDF renderer uses https://github.com/jung-kurt/gofpdf which is not supported anymore, it includes a semi-functioning font system

  • unipdf

    Golang PDF library for creating and processing PDF files (pure go)

    It is true that there isn't much professional software around PDFs, though the other day I found https://github.com/unidoc/unipdf which may help you out (it didn't in my case). However, in order to convert it to an image.Image you need a fully functioning PDF reader and renderer which is a lot of work. Better look at GNOME's evince for example and see if you can reuse part using CGO.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts