Introduction to Cairo
Cairo is a 2D graphics library with support for
multiple output devices. Currently supported output targets include the
X Window System, Win32, image buffers,
PostScript, PDF and SVG. Experimental backends include OpenGL, Quartz and
XCB file output. Cairo is designed to produce
consistent output on all output media while taking advantage of display
hardware acceleration when available (e.g., through the X Render
Extension). The Cairo API provides operations
similar to the drawing operators of PostScript and PDF. Operations in
Cairo include stroking and filling cubic
Bézier splines, transforming and compositing translucent images,
and antialiased text rendering. All drawing operations can be transformed
by any
affine
transformation (scale, rotation, shear, etc.).
Note
Development versions of BLFS may not build or run
some packages properly if LFS or dependencies have been updated
since the most recent stable versions of the books.
Package Information
Cairo Dependencies
Required
libpng-1.6.40 and
Pixman-0.42.2
Recommended
Fontconfig-2.14.2,
GLib-2.78.1 (required for most GUIs), and
Xorg Libraries
Optional
ghostscript-10.02.1,
GTK+-3.24.38 and GTK+-2.24.33,
GTK-Doc-1.33.2,
libdrm-2.4.118,
librsvg-2.57.0,
libxml2-2.12.1,
LZO-2.10,
Mesa-23.1.8,
Poppler-23.11.0,
Valgrind-3.22.0,
jbig2dec,
libspectre, and
Skia
Note
There is a circular dependency between cairo and harfbuzz.
If cairo is built before harfbuzz, it is necessary to rebuild cairo
after harfbuzz in order to build pango.
Installation of Cairo
Install Cairo by running the following
commands:
mkdir build &&
cd build &&
meson setup --prefix=/usr --buildtype=release .. &&
ninja
This package does not have a working test suite.
Now, as the root
user:
ninja install
Command Explanations
--buildtype=release
: Specify a buildtype
suitable for stable releases of the package, as the default may
produce unoptimized binaries.
-Dxlib-xcb=enabled
: This switch enables several
experimental Xlib/XCB functions used by some window managers.
-Dgtk_doc=true
: Use this parameter if GTK-Doc is
installed and you wish to create and install the documentation.