Skip to content

edicl/cl-gd

Repository files navigation

Complete documentation for CL-GD can be found in the 'doc'
directory.

CL-GD also supports Nikodemus Siivola's HYPERDOC, see
<http://common-lisp.net/project/hyperdoc/> and
<http://www.cliki.net/hyperdoc>.

1. Installation (see doc/index.html for Windows instructions)

1.1. Download and install a recent version of GD and its supporting
     libraries.  Please use your operating system's package manager to
     install the "development" version of the GD library.  On Ubuntu
     Linux, this can be achieved with the command:

       apt-get install libgd2-xpm-dev

     GD depends on several other libraries to handle different
     graphics formats.  These should be installed by your package
     manager automatically.  If you cannot use or do not have a
     package manager that includes GD, you'll have to follow the GD
     installation instructions (http://www.boutell.com/gd/).  Note
     that you won't be able to compile CL-GD unless you have installed
     all supporting libraries. This is different from using GD
     directly from C where you only have to install the libraries you
     intend to use.

1.2. Install cl-gd and its Lisp dependencies using quicklisp
     (http://quicklisp.org/).

1.3. Compile cl-gd-glue.c into a shared library for your platform.  A
     simple Makefile is included in the cl-gd source directory.

     For FreeBSD and Linux, just type

       make

     For OSX, type 

       make cl-gd-glue.dylib


2. Test

CL-GD comes with a simple test suite that can be used to check if it's
basically working. Note that this'll only test a subset of CL-GD. To
run the tests load CL-GD and then

       (asdf:oos 'asdf:load-op :cl-gd-test)
       (cl-gd-test:test)

If you have the georgiab.ttf TrueType font from Microsoft you can also
check the FreeType support of CL-GD with

       (cl-gd-test:test #p"/usr/X11R6/lib/X11/fonts/truetype/georgiab.ttf")

where you should obviously replace the path above with the full path
to the font on your machine.

(See the note about failed tests in the documentation.)