BSD Ports

graphics/nanosvg 20241219 DragonFly

Simple C++ header-only SVG parser

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
ZLIB
Categories
graphics
Package size
26.5 KiB, 120.0 KiB installed

Description

NanoSVG is a simple stupid single-header-file SVG parse. The output of the parser is a list of cubic bezier shapes.

The library suits well for anything from rendering scalable icons in your editor application to prototyping a game.

NanoSVG supports a wide range of SVG features, but something may be missing, feel free to create a pull request!

The shapes in the SVG images are transformed by the viewBox and converted to specified units. That is, you should get the same looking data as your designed in your favorite app.

NanoSVG can return the paths in few different units. For example if you want to render an image, you may choose to get the paths in pixels, or if you are feeding the data into a CNC-cutter, you may want to use millimeters.

The units passed to NanoSVG should be one of: 'px', 'pt', 'pc' 'mm', 'cm', or 'in'. DPI (dots-per-inch) controls how the unit conversion is done.

If you don't know or care about the units stuff, "px" and 96 should get you going.

In the other systems

SystemPortVersion
DragonFlygraphics/nanosvg20241219
FreeBSDgraphics/nanosvg20241219
OpenBSDgraphics/nanosvg20221222
NetBSDwip/nanosvg20231202
HardenedBSDgraphics/nanosvg20241219
GhostBSDgraphics/nanosvg20241219

Install

Binary package:

pkg install nanosvg

From DPorts:

cd /usr/dports/graphics/nanosvg && make install clean

Dependencies

No port depends on this one.