[cairo] Mac OS X support added

Owen Taylor otaylor at redhat.com
Sun Jan 16 11:43:05 PST 2005


On Sun, 2005-01-16 at 17:09 +0000, Calum Robinson wrote:
> http://homepage.mac.com/calumr/fdclock-osx.png
> 
> I have just committed the changes for Mac OS X to Cairo CVS, including 
> a new Quartz demo app (at cairo/cairo-demo/quartz). The quartz surface 
> backend is pretty basic, and the ATSUI font backend doesn't have any 
> caching code in it yet (and is actually broken ATM because of some 
> recent changes to the FT backend that I hadn't checked out until 
> today).

Don't spend a ton of time doing more than basic fixes to the font code..
I have a multi-thousand line patch almost done that changes things
around a quite a bit ... that will likely land later this week
after the release.

 cairo_font_t is a font scaled to a particular size and output
  device. From a quick look, it doesn't correspond that closely
  to any Quartz object, but it shouldn't work out worse than the
  current system.

 cairo_unscaled_font_t is just a stub to use in the glyph image
  cache, if you are using that. (My guess is that the win32 backend
  won't use the glyph image cache and will leave any caching to
  the operating system. Unless performance ends up showing that
  that is a bad idea. Probably Quartz will be similar)

> I still haven't implemented the Makefile changes to support Mac OS X 
> targets, as up until now I have been building Cairo as a framework in 
> Xcode (the project has also been checked into CVS at cairo/macosx). 
> This is the first thing that I will need help with.
> 
> On 14 Jan 2005, at 20:00, cairo-request at cairographics.org wrote:
> 
> > Just a note that I am offering to help out (in whatever way possible),
> > on the Quartz port. We had been working on the Mozilla Quartz renderer 
> > for SVG,
> > but this track seems to be more promising as the Moz folks are actively
> > integrating Cairo for X platforms.
> >
> > I am hoping that Calum Robinson will help me get jumpstarted --- and I 
> > can
> > lend a useful hand.
> 
> What would be really useful is if Cairo could just get the Quartz 
> backend to draw curves and set the clip region etc., rather than just 
> sending it trapezoids to draw. I get the impression this may be done 
> for the PDF backend?

It's been a matter of some debate ... the current backend interface
concentrates on consistency between backends rather than being natural
to a particular backend. It would certainly produce more "normal" 
PDF files to let the backend hook in directly to clip and and path.

Regards,
					Owen

Side note ... your files don't use 8 character tabs. I know that
changing tab size to correspond to the indentation level is a common
OS X thing (I've had some long debates with my coworker Dan Williams
about this), but it really conflicts badly with Unix tradition,
which is that the tab character is just a means of compressing
whitespace, and tab stops are *always* at 8 character positions.
To indent 4 spaces, use 4 spaces. To indent 4 spaces twice, use
a tab or 8 spaces.

In order to inter-operate with other people working on Cairo, you'll
need to either use 8 character tabs or not use tabs at all for changes
within Cairo.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050116/1e514418/attachment.pgp


More information about the cairo mailing list