Cairo/pango
Contents
Description
Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System, Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL (through glitz), XCB, BeOS, OS/2, and DirectFB.
Pango is a library for laying out and rendering of text, with an emphasis on internationalization. Pango can be used anywhere that text layout is needed, though most of the work on Pango so far has been done in the context of the GTK+ widget toolkit.
Instructions for Windows
MinGW
For the MinGW toolset it's best to download the provided Windows binaries form the GTK+ project.
- Download the all-in-one bundle of the Windows GTK+ stack including 3rd-party dependencies for windows: GTK+ 2.20 or GTK+ 2.16
- Unzip the package to a directory, e.g. C:\Development\gtk
- Set environment variables so that CMake can find pkf-config
set PKG_CONFIG_PATH=C:\Development\gtk\lib\pkgconfig set PATH=C:\Development\gtk\bin;%PATH%
CMake will find pkg-config and all the libraries necessary to build the pdfcairo, pscairo, pngcairo, svgcairo and wincairo devices. xcairo will not be built since the X-Headers are not present on Windows.
Visual C++
If you use the MicroSoft Visual C/C++ (MSVC) compiler (with any compatible additional compilers like Intel Fortran), then the receipe remains the same as for MinGW with the GCC compilers: the binaries from the GTK+ project include the libraries required by MSVC and the build system automatically finds them if you set the environment as above.
(Note: this was tested for MSVC 9.0 and Intel Fortran 11.1, it may not work with older versions of MSVC, as at some point the calling conventions for DLLs were changed.)
Instructions for Linux
Usually the cairo/pango libraries are already installed on your Linux distribution, but the developer packages might be missing. E.g. for Ubuntu Linux just install the pango developer package:
sudo apt-get install libpango1.0-dev
Since pango depends on cairo all the necessary developer packages are installed with this command. Similar instructions apply to other Linux distributions.
Instructions for Mac OS X
- Download the GTK_2.18.5-X11.pkg package from http://r.research.att.com/ and install it
- Add to your .profile file in the home directory:
export PATH=/Library/Frameworks/GTK+.framework/Resources/bin:$PATH
cmake is now able to find the cairo/pango libraries via pkg-config.