Closed
Bug 438702
Opened 16 years ago
Closed 13 years ago
Canvas text baselines not fully implemented
Categories
(Core :: Graphics: Canvas2D, enhancement)
Core
Graphics: Canvas2D
Tracking
()
RESOLVED
FIXED
mozilla5
People
(Reporter: ebutler, Assigned: jag+mozilla)
References
(Blocks 1 open bug)
Details
(Keywords: html5)
Attachments
(2 files)
1.47 KB,
text/html
|
Details | |
1.45 KB,
patch
|
roc
:
review+
joe
:
approval2.0-
|
Details | Diff | Splinter Review |
The textBaseline attribute of Canvas is not fully implemented. The "ideographic" and "hanging" baselines are currently silently treated as the "alphabetic" baseline due to lack of font metric support.
Assignee | ||
Comment 1•13 years ago
|
||
Not sure Sanskrit and Chinese are the right glyphs to trigger hanging and ideographic, but replacing the text is easy enough. Webkit doesn't seem to properly handle hanging and ideographic either, though they've picked "top" as the fallback for "hanging", and "bottom" as the fallback for "ideographic". What is "hanging" supposed to do for non-hanging glyphs? Depending on the answer to that we might also want to make "top" the fallback for "hanging".
Comment 3•13 years ago
|
||
this is how it's /supposed/ to work http://www.whatwg.org/specs/web-apps/current-work/images/baselines.png isn't that just height - x-height + top ?
Comment 4•13 years ago
|
||
and ideographic is the (bottom - (heightofasiancharacter-bottom))?
Assignee | ||
Comment 5•13 years ago
|
||
Jamie Pate: I interpret the colored lines matching the colored glyphs to mean that certain concepts only apply to certain groups of glyphs. Is that what you mean?
Assignee | ||
Comment 6•13 years ago
|
||
In SVG we apparently do let "hanging" fall through to "top" (called text_before_edge there), so for consistency with SVG and with Webkit I think we should too.
Assignee | ||
Comment 7•13 years ago
|
||
Attachment #502346 -
Flags: review?
Assignee | ||
Updated•13 years ago
|
Attachment #502346 -
Flags: review? → review?(roc)
Assignee | ||
Comment 8•13 years ago
|
||
Comment on attachment 502346 [details] [diff] [review] Make "hanging" like "top" for parity with SVG and webkit. Just noticed I left an extra |break;| in. That should be removed before check-in.
Assignee | ||
Comment 9•13 years ago
|
||
As an heuristic for "hanging" the point halfway between xHeight and emAscent seems to work reasonably well.
Attachment #502346 -
Flags: review?(roc) → review+
Assignee | ||
Updated•13 years ago
|
Attachment #502346 -
Flags: approval2.0?
Comment 10•13 years ago
|
||
Comment on attachment 502346 [details] [diff] [review] Make "hanging" like "top" for parity with SVG and webkit. Sorry, it's just too late for this bug to land (especially with no tests). Let's get it in post-2.0.0.
Attachment #502346 -
Flags: approval2.0? → approval2.0-
Comment 11•13 years ago
|
||
http://hg.mozilla.org/projects/cedar/rev/ba272ca52713
Assignee: nobody → jag-mozilla
Whiteboard: fixed-in-cedar
Comment 12•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/ba272ca52713
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
Target Milestone: --- → mozilla2.2
You need to log in
before you can comment on or make changes to this bug.
Description
•