[cairo] Cairo on win32

Carl Worth cworth at east.isi.edu
Wed May 26 18:24:51 PDT 2004

On Wed, 26 May 2004 23:07:35 +0200, Maarten Breddels wrote:
> I read on the Dia thread that Hans Breuer also got cairo working on
> win32. Nonetheless I hereby send a small diff and 2 files. I don't care
> which patch gets into the cvs, i'd just like to see cairo on win32.

Maarten, Thanks for this patch. I haven't seen anything else yet, so if
it's a race, you're winning.

> The diff includes a change to the freetype backend, instead of the
> FcPattern argument, the font create function takes a filename as
> argument, or a part of the filename(<windows font dir>\<pattern>.ttf),
> where the <windows font dir> is taken from the registry.

I definitely don't like the idea of using the same function names but
with different semantics. If it makes sense to use FreeType on win32, is
it not just as sensible to use fontconfig too?

I had always anticipated that someone would develop some non-FreeType
native font backend for win32.

>                              It also includes a load of #pragma
> directives to export the symbols for building a DLL. This avoids adding
> (ugly) dsa __declspec(dllexport)'s to cairo.h.

Hurrah! I'm quite happy to see all the ugly stuff needed for win32
exporting relegated to cairo_win32.c rather than mucking up cairo.h on
every platform. Well done.

I suppose the only downside is that it will be easier for someone to add
a new function to cairo.h and leave the win32 export stuff stale. But
I'm not too concerned about that since creating new public functions is
a rare event.


More information about the cairo mailing list