Last Comment Bug 738691 - [Azure] Deal with stroking text and appending glyphs to the current path
: [Azure] Deal with stroking text and appending glyphs to the current path
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: unspecified
: x86_64 Windows 7
: -- normal (vote)
: mozilla14
Assigned To: Bas Schouten (:bas.schouten)
:
Mentors:
Depends on: 742727 743767
Blocks: 715768
  Show dependency treegraph
 
Reported: 2012-03-23 10:22 PDT by Bas Schouten (:bas.schouten)
Modified: 2012-05-20 13:41 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Part 1: Add CopyGlyphsToBuilder API (5.16 KB, patch)
2012-03-23 10:23 PDT, Bas Schouten (:bas.schouten)
jmuizelaar: review+
Details | Diff | Review
Part 2: Add proper stroke and path support to Azure glyph drawing (13.12 KB, patch)
2012-03-23 10:24 PDT, Bas Schouten (:bas.schouten)
jmuizelaar: review+
Details | Diff | Review

Description Bas Schouten (:bas.schouten) 2012-03-23 10:22:24 PDT
For SVG we need to support stroking text outlines and appending text to the current path.
Comment 1 Bas Schouten (:bas.schouten) 2012-03-23 10:23:19 PDT
Created attachment 608748 [details] [diff] [review]
Part 1: Add CopyGlyphsToBuilder API

This will allow adding the path for glyphs to a pathbuilder. This is required for supporting the new code.
Comment 2 Bas Schouten (:bas.schouten) 2012-03-23 10:24:39 PDT
Created attachment 608750 [details] [diff] [review]
Part 2: Add proper stroke and path support to Azure glyph drawing

This patch adds proper stroke and path support to Azure glyph drawing. It also fixes numerous other bugs related to patterns being properly transformed when a skew is applied and using the proper pattern for glyph fills.
Comment 3 Jeff Muizelaar [:jrmuizel] 2012-03-26 15:19:59 PDT
(In reply to Bas Schouten (:bas) from comment #0)
> For SVG we need to support stroking text outlines and appending text to the
> current path.

What about SVG requires this?
Comment 4 Bas Schouten (:bas.schouten) 2012-03-28 13:29:22 PDT
(In reply to Jeff Muizelaar [:jrmuizel] from comment #3)
> (In reply to Bas Schouten (:bas) from comment #0)
> > For SVG we need to support stroking text outlines and appending text to the
> > current path.
> 
> What about SVG requires this?

Rendering strokes of glyphs is required by several things, appending glyphs to the current path is needed for SVG masking. See nsSVGGlyphFrame.cpp for the calling code.
Comment 5 Jeff Muizelaar [:jrmuizel] 2012-03-28 21:09:40 PDT
Comment on attachment 608748 [details] [diff] [review]
Part 1: Add CopyGlyphsToBuilder API

How about instead of doing this as CopyGlyphsToBuilder()
We add AppendPathToBuilder(GetPathForGlyphs())?
Comment 6 Bas Schouten (:bas.schouten) 2012-03-28 21:12:32 PDT
(In reply to Jeff Muizelaar [:jrmuizel] from comment #5)
> Comment on attachment 608748 [details] [diff] [review]
> Part 1: Add CopyGlyphsToBuilder API
> 
> How about instead of doing this as CopyGlyphsToBuilder()
> We add AppendPathToBuilder(GetPathForGlyphs())?

I considered this, this would perform significantly worse for D2D, (where we can pass a PathSink directly do an IDWriteScaledFont) although not really hard to implement. It is probably even harder to implement efficient for some other backends. (i.e. in this code if the builder passed in is the current cairo context for example, it could just append the path info for the glyphs to that, so it doesn't have to go through creating a temporary path context.
Comment 7 Jeff Muizelaar [:jrmuizel] 2012-03-29 05:40:33 PDT
Comment on attachment 608748 [details] [diff] [review]
Part 1: Add CopyGlyphsToBuilder API

Looks fine. It would be great if you could add the note about why CopyGlyphsToBuilder instead of AppendPathToBuilder that would be great.
Comment 8 Bas Schouten (:bas.schouten) 2012-03-29 11:56:56 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/23fb49402114

Note You need to log in before you can comment on or make changes to this bug.