[cairo] 1.4.14 candidate snapshot (was: Correcting the 'wild miter' test for bug 7245)

Carl Worth cworth at cworth.org
Tue Jan 8 17:04:49 PST 2008

On Thu, 03 Jan 2008 18:37:53 -0800, Keith Packard wrote:
> Here's a proposed patch that replaces the high-level test with a simple
> sanity check for the resulting miter point. If the computed miter point
> does not lie between the two faces, the miter is replaced with a
> bevel.

I like this approach[*], so I've applied it on master, cherry-picked
it to the 1.4 branch, and pushed the 1.4 branch out[**].

Interestingly, there is a failure of the new miter-precision test with
the PostScript backend, even with the fix. Part of that is that the
impossibly thin stroke is being rendered by ghostscript with a
non-zero width. That's not too surprising, and I can easily ignore
that. But also, ghostscript is converting the miter join in the
lower-left case to a bevel. I fiddled with the miterlimit in the file
and couldn't get it to change at all.

I'm willing to chalk this up as either a bug in ghostscript, or a case
that's only hit with *extreme* scaling like the test is doing. But
it's also possible that this is a legitimate bug in PostScript itself
that cairo should work around, (potentially detecting this case and
emitting a fill instead---which would require some new---or just doing
a fallback image if we can be sure that the PostScript stroke will be

Is anyone out there concerned enough about this case to look into it
more closely?

Meanwhile, the more general bevel-for-miter bug was a pretty bad
regression that I introduced in the 1.4.12 release, (the Scribus folks
had noticed it already, for example), so I want to put out a 1.4.14
release with this fix as soon as possible.

I've just posted a snapshot with what's on the 1.4 branch now:


There have been few enough changes since 1.4.12 that I'm pretty
confident we haven't broken the build for any platforms, (but it never
hurts if anybody wants to check). But more than that, I'd like to ask
any cairo hackers if they have fixes that are already pushed to master
that should be considered candidates for getting cherry-picked over to
1.4 right away.

Here are the notes I just wrote up for what's there so far:

	Fix a regression (which first appeared in 1.4.12) where stroking under
	a large scale would sometimes incorrectly replace a miter join with a
	bevel join. (Thanks to Keith Packard.)

	Fix xlib backend to not consider recent X server release as having a
	buggy repeat implementation in the Render extension. (Thanks to
	Bernardo Innocenti.)

	Fix several bugs in cairo's PostScript output. These include making
	the PostScript output more compatible with recent versions of
	ghostscript that are more strict about Type 3 fonts, for
	example. (Many thanks to Adrian Johnson.)

What else really should be here?


[*] There's a minor problem in that the patch introduces cairo's
*third* slope_compare function, but it is unique, (acting on doubles,
for example), so it's not too bad. I would like to move it to
cairo-slope.c. Interestingly, it also implements the slope comparison
in the opposite sense as the comparison in that file already, (but it
matches the one in cairo-bentley-ottmann.c---which is more specialized
so I don't think we look to it for any precedent). I don't think the
fix here cares about the sense at all, so I'll probably change it to
match. But those are little cleanups I'll do on master, and not on

[**] I haven't yet pushed the new master branch, so for a short time
the cherry-picked commit message will refer to a commit identifier
which nobody can get at but me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080108/80da94a4/attachment.pgp 

More information about the cairo mailing list