(this is against nquartz, not quartz, but theres no component yet)
The bug is easy to reproduce - just run the line-width-scale test. Apparently this bug is biting the Joost folks.
The reason for the bug is that line width scaling is done in cairo-path-stroke.c, not used in nquartz, while all of the points used in paths are scaled in cairo-gstate.
A patch follows which undoes the point scaling then draws the paths applying the scale to the CGContext. However some paths that hit this code don't provide the matrices required. A better fix (?) might be to store the points in the path in user space, at least for nquartz. I'm not proposing that here as its much more disruptive.
Created attachment 8781 [details] [review]
patch fixing the problem in a minimalist way.
This makes a couple of tests pass, but the code paths where I use the identity matrix look super-suspicious; I can't fix those without much larger changes, but then, I don't know what tests they cause to fail (if any).
It seems that a very similar patch was already reviewed and applied to the pdf surface backend:
Since Carl ok'd that patch, this one can't be as bad as I thought :) I'll massage it into the same shape (nulls instead of identity matrices, consistent names, etc) and push that tonight if Vlad gives it the ok.
Created attachment 8795 [details] [review]
This patch is more like the one applied to the pdf surface, and is updated now that the nquartz surface has been renamed.
Created attachment 9001 [details] [review]
updated patch after nquartz renamed to quartz.
this is the same patch as before, just brought up to date again.
*** Bug 10141 has been marked as a duplicate of this bug. ***
Created attachment 9282 [details] [review]
fixes patch up to pass text-rotate test
The previous version of the patch produced incorrect results when the ctm contained rotation, eg the text-rotate test. This version fixes that up. The only test still looking odd is skew-extreme, which now has lines with the correct widths but apparently incorrect offsets.
Created attachment 9292 [details] [review]
reverting to a previous version of patch after bugfix
The reason why the original patch messed up on rotation/skew was due to a typo elsewhere in the code, fixed in commit c8e37af4b06fffe1aa1a1c3d2cd6481cc2cf8938.
With this patch quartz now passes the line-width, line-width-scaled and skew-extreme tests.
This was fixed back in March.