[cairo] Mac OS X support added

Keith Packard keithp at keithp.com
Sun Jan 16 13:09:11 PST 2005


Thanks for landing the OS X support.  Owen has already mentioned the tab 
issue, and I hope you can find a way to follow the usual Unix whitespace 
conventions.

I was wondering about a change to cairo.h that you've made:

> -#include <cairo-features.h>
> +#if !TARGET_OS_MAC
> +	#include <cairo-features.h>
> +	#include <pixman.h>
> +#else
> +	#include <Cairo/cairo-features.h>
> +	#include <Cairo/pixman.h>
> +#endif
> +
>  
> -#include <pixman.h>

This seems entirely unnecessary to me; a simple -I../Cairo should make the 
original include lines work as expected and would avoid messing up the top 
of this important file.

Also, in cairoint.h:

> +#ifdef CAIRO_HAS_FT_FONT
...
> +#elif defined(CAIRO_HAS_ATSUI_FONT)
...
> +#endif

This should just be

  #ifdef CAIRO_HAS_FT_FONT
  ...
  #endif

  #ifdef CAIRO_HAS_ATSUI_FONT
  ...
  #endif

It should be possible to have multiple font backends compiled into cairo 
at the same time, permitting applications to choose between inter- and 
intra- platform consistency.

> +#ifdef CAIRO_HAS_FT_FONT
> +
> +#define CAIRO_FONT_FAMILY_DEFAULT  "serif"
> +

This should probably be

#define CAIRO_FT_FONT_FAMILY_DEFAULT	"serif"
#define CAIRO_ATSUI_FONT_FAMILY_DEFAULT	"Monaco"

Without the ifdefs, and with specific names, the intended usage is much 
clearer.  (as a separate issue, the default FT font family should be "", 
which permits the user configuration to select an appropriate face).

-keith


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050116/366db327/attachment.pgp


More information about the cairo mailing list