Bug 23067 - [CG] Canvas: stroked text with pattern or gradient can have truncated miters
Summary: [CG] Canvas: stroked text with pattern or gradient can have truncated miters
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-01 13:51 PST by Simon Fraser (smfr)
Modified: 2010-07-01 11:24 PDT (History)
3 users (show)

See Also:


Attachments
Testcase (1.28 KB, text/html)
2009-01-01 13:58 PST, Simon Fraser (smfr)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2009-01-01 13:51:59 PST
CanvasRenderingContext2D::drawTextInternal() uses the computed textRect as the size of the mask image created for painting text stroke with a gradient or pattern.

textRect is too small if stroking text, because it does not take the bounds of the stroke into account; it fails to account for miters etc.
Comment 1 Simon Fraser (smfr) 2009-01-01 13:58:02 PST
Created attachment 26351 [details]
Testcase
Comment 2 Dirk Schulze 2009-02-05 12:39:51 PST
Maybe Path::strokeBoundingRect() can help here. We moved it from SVG to Path. See SVGPaintServer.cpp and RenderObject.cpp for the usage.
Comment 3 Dirk Schulze 2009-02-27 00:25:47 PST
Other platforms don't use clipToImageBuffer anymore. That means it's only a CG related bug.
My last suggestion can't work here. Text's are no paths :-P

But why using clipToImageBuffer for both, gradients and pattern. We just need it for gradients, right?