SVG should disable antialiasing for shape-rendering="crispEdges" We don't support the shape-rendering property yet, but we really should. crispEdges is actually really useful for the implicit "align to device pixels" behavior.
Created attachment 17803 [details] First attempt The patch should do it. Not sure whether we only need the pixel result though. I only implemented it for mac and qt and tried to add empty stubs for the others. Cheers, Rob.
Comment on attachment 17803 [details] First attempt Looks fine, r=me
This looks great... my question to you though is how nice does the rendered result look? (I can check myself next time I build.) We might end up making a more sophisticated rule in the end: crispEdges Indicates that the user agent shall attempt to emphasize the contrast between clean edges of artwork over rendering speed and geometric precision. To achieve crisp edges, the user agent might turn off anti-aliasing for all lines and curves or possibly just for straight lines which are close to vertical or horizontal. Also, the user agent might adjust line positions and line widths to align edges with device pixels.
Landed in r28588.
Why did this patch add GraphicsContext::setUseAntialiasing() when it already has: void setShouldAntialias(bool); bool shouldAntialias() const; ? Filed bug 23425 to clean this up.
(In reply to comment #5) > Why did this patch add GraphicsContext::setUseAntialiasing() when it already > has: > > void setShouldAntialias(bool); > bool shouldAntialias() const; > ? > > Filed bug 23425 to clean this up. Wow, this is old. I think at the time those values only applied to text. But maybe I'm remembering wrong.