[cairo] How to enable cairo in Windows?

Sverre Stausland johnsen at fas.harvard.edu
Mon Oct 31 14:41:26 PDT 2011

Hi cairo users,

I am trying to find a way to enable cairo for Windows. I am using
Windows XP SP3, and my incentive for enabling cairo is that it is
required for using the Cairo package in R

According to http://www.cairographics.org/download/ under 'Windows',
cairo can be enabled in the following way:

Go to official GTK+ for Windows page.

You want "cairo-1.4.8.zip", the binary distribution at "libpng 1.2.8",
and "Zlib 1.2.3" (you can search on those strings to find them in the
page). That should be it. Just pop libcairo-2.dll, libpng13.dll and
zlib1.dll into your working directory or system PATH, and away you go!

As suggested by Luiz Camara
the packages I need are 'zlib', 'cairo', 'libpng', 'Freetype',
'Fontconfig', and 'expat'. I downloaded the run-time zip files for
these packages from http://www.gtk.org/download/win32.php.

Then as suggested by Theo Veenker
I put the .dll files from these packages into my R bin folder

But when I start up R, load the Cairo package, and attempt to run
functions from this package (see
http://lists.freedesktop.org/archives/cairo/2011-July/022116.html), I
get a message saying that cairo is not enabled:

> library(Cairo)
> CairoPDF("DoulosCairo.pdf")
> CairoFonts(regular="Doulos Sil:style=Regular",
+  bold="Doulos Sil:style=Bold",
+  italic="Doulos Sil:style=Italic",
+  bolditalic="Doulos Sil:style=Bold Italic,BoldItalic",
+  symbol="Symbol"
+ )
Warning message:
In CairoFonts(regular = "Doulos Sil:style=Regular", bold = "Doulos
Sil:style=Bold",  :
  the R Cairo package was not installed with fontconfig. Please
consider installing the cairo graphics engine (www.cairographics.org)
with freetype and fontconfig support

In the end, my question is simply this: What do I need to do to enable
cairo in Windows?


More information about the cairo mailing list