{"repo":"tdewolff/canvas","free":true,"listed":false,"github":"https://github.com/tdewolff/canvas","clone":"git clone https://github.com/tdewolff/canvas.git","description":"Vector graphics in Go","language":"Go","stars":1831,"topics":["path","vector-graphics","html-canvas","opengl","cairo","svg","eps","rasterizer","canvas","pdf"],"license":"MIT","category":"media-processing","readme_excerpt":"FUNDING REQUIRED please contact me to support this work API documentation User guide Live HTMLCanvas demo Benchmarks Canvas is a common vector drawing target that can output SVG, PDF, EPS, raster images (PNG, JPG, GIF, ...), HTML Canvas through WASM, OpenGL, and Gio. It has a wide range of path manipulation functionality such as flattening, stroking and dashing implemented. Additionally, it has a text formatter and embeds and subsets fonts (TTF, OTF, WOFF, WOFF2, or EOT) or converts them to outlines. It can be considered a Cairo or node-canvas alternative in Go. See the example below in Figure 1 for an overview of the functionality. Figure 1 : top-left you can see text being fitted into a box, justified using Donald Knuth's linea breaking algorithm to stretch the spaces between words to fill the whole width. You can observe a variety of styles and text decorations applied, as well as support for LTR/RTL mixing and complex scripts. In the bottom-right the word \"stroke\" is being stroked and drawn as a path. Top-right we see a LaTeX formula that has been converted to a path. Left of that we see an ellipse showcasing precise dashing, notably the length of e.g. the short dash is equal wherever it is on the curve. Note that the dashes themselves are elliptical arcs as well (thus exactly precise even if magnified greatly). To the right we see a closed polygon of four points being smoothed by cubic Béziers that are smooth along the whole path, and the blue line on the left shows a sm","default_branch":null,"files":null,"tree":[],"storefront":"/r/tdewolff","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tdewolff/canvas/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}