1 Getting Started
dxtr edited this page 2026-10-18 02:22:12 +02:00

Getting Started

The systems

System What it is Needs
cl-svgread The reader: SVG text into drawings, shapes and paths. xmls, which reads the XML.
cl-svgread/ft2 The rasterizer: drawings into RGBA images, with FreeType's stroker and rasterizer. cl-svgread, cl-ft2, and the FreeType library, 2.13.1 or newer, at run time.
cl-svgread/test The tests, on Parachute. Both of the above.

The reader needs no foreign code at all. Load cl-svgread/ft2 only to rasterize: a program that draws the shapes itself, on the GPU or with a rasterizer of its own, needs cl-svgread alone.

Requirements

  • SBCL.
  • FreeType, for cl-svgread/ft2 only: libfreetype6 on Debian and Ubuntu, freetype on most other systems. On Windows, cl-ft2 carries its own.

Installing

cl-svgread's dependencies are pinned by commit in its stiftfile, with stift. In a project of your own, require it:

stift get https://fakehacker.cc/dxtr/cl-svgread.git

and load it:

(asdf:load-system :cl-svgread)       ; reading
(asdf:load-system :cl-svgread/ft2)   ; and rasterizing

The packages are cl-svgread and cl-svgread/ft2. Give them short local nicknames in a package of your own:

(defpackage #:my-icons
  (:use #:cl)
  (:local-nicknames (#:svg #:cl-svgread)
                    (#:svg-ft2 #:cl-svgread/ft2)))

Running the tests

From cl-svgread's own directory:

stift test

The tests of cl-svgread/ft2 rasterize, so they need FreeType. stift --no-workspace test runs them from the stiftfile's pins alone, as CI does.