Opened 11 years ago
Closed 11 years ago
#12158 closed defect (fixed)
[patch][CCLA]gfx canvas renderer does not support text rendering
Reported by: | Ed Chatelain | Owned by: | Eugene Lazutkin |
---|---|---|---|
Priority: | high | Milestone: | 1.6 |
Component: | DojoX GFX | Version: | 1.6.0b1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Reported by Patrick Ruzand (IBM)
The current implementation of the gfx canvas renderer does not implement text rendering, as this feature was not specified (in the HTML5 spec) at the time the canvas renderer was implemented. Now that the canvas text api has been specified and implemented in all modern browsers, it should be the case for gfx too. see http://old.nabble.com/-gfx--text-and-canvas-renderer-to30649818.html for the corresponding discussion with the gfx dev.
Patch from Patrick (IBM, CCLA) and Ed (IBM, CCLA) to follow.
Attachments (2)
Change History (7)
Changed 11 years ago by
Attachment: | canvas-textsupport.txt added |
---|
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
New patch to integrate FF bug fix above and fix code styling to match dojo CS.
Changed 11 years ago by
Attachment: | canvas_renderText.patch added |
---|
integrate FF bug fix. Fix coding style.
comment:3 Changed 11 years ago by
Summary: | gfx canvas renderer does not support text rendering → [patch][CCLA]gfx canvas renderer does not support text rendering |
---|
comment:4 Changed 11 years ago by
Milestone: | tbd → 1.6 |
---|---|
Status: | new → assigned |
comment:5 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
It appears that due to a bug in Firefox 3.6, strokeText() strokes any paths drawn previously. The following code illustrates the bug :
will stroke the rect in blue under FF but is ok under Chrome/Safari?.
The fix is to wrap the strokeText() call between a beginPath()/closePath().
I think the corresponding br in bugzilla is https://bugzilla.mozilla.org/show_bug.cgi?id=499628