Bug 38463
| Summary: | Fails on Canvas test case: http://philip.html5.org/tests/canvas/suite/tests/2d.text.draw.baseline.top.html | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Chang Shu <cshu> |
| Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | adele, ahmad.saleem792, eae, laszlo.gombos, leviw, mdelaney7, mmaxfield, robert, tony |
| Priority: | P2 | Keywords: | BrowserCompat |
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | OS X 10.5 | ||
| Bug Depends on: | |||
| Bug Blocks: | 20553 | ||
Chang Shu
http://philip.html5.org/tests/canvas/suite/tests/2d.text.draw.baseline.top.html
Run above test case on Safari.
Actual result: failed
Expected result: pass
The same test case passes on Firefox4.6.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Matthew Delaney
Also fails on both Opera 10.53 and Chrome 5.0.375.38 beta on Snow Leopard.
Robert Hogan
I'd love to know what's going on with our font metrics here. The reason we fail this and the other canvas baseline tests is down to the ascent and descent we calculate for the font before drawing it. I imagine this varies between platforms but I've tested it on Chromium Linux.
Tony - this must be FontMetrics 101, can you shed any light on why Firefox and Chromium Linux (for example) return different ascent/descent for the same font?
The person at http://mudcu.be/journal/2011/01/html5-typographic-metrics/#baselineCanvas looked into this a bit and concluded it was 'invisible space'. :)
Tony Chang
I actually know very little about font metrics and don't know where this extra 'invisible space' comes from. Levi or Emil probably know more.
Levi Weintraub
(In reply to comment #3)
> I actually know very little about font metrics and don't know where this extra 'invisible space' comes from. Levi or Emil probably know more.
I'm afraid this one is beyond my expertise as well :-/
Ahmad Saleem
I am still able to reproduce this bug using the test link in Comment 01 in Safari 15.5 on macOS 12.4. All other browsers like Chrome Canary 104 and Firefox Nightly 103 pass the test. Thanks!