svg underline issue with centered text
Categories
(Core :: Layout: Text and Fonts, defect, P3)
Tracking
()
People
(Reporter: mburo, Unassigned)
References
(Depends on 1 open bug)
Details
Attachments
(5 files, 3 obsolete files)
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0
Steps to reproduce:
unzip testcase.zip
firefox test.html
chrome test.html
Actual results:
An unexpected underline pattern is produced
Expected results:
Regular underlined text should be generated (compare with chrome output - attached). I included a font to show that this isn't a font issue.
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•5 years ago
|
||
Comment 3•5 years ago
|
||
Comment 4•5 years ago
|
||
Comment 5•5 years ago
|
||
Comment 6•5 years ago
|
||
Comment 7•5 years ago
|
||
Seems fine on Mac. layout/text probably makes more sense for this.
Updated•5 years ago
|
Comment 8•5 years ago
|
||
The issue reproduces for me on macOS too. (Note that the testcase attached to bugzilla fails to load the linked font, because the attachment fails a CORS check. So we get fallback to Times, where the issue isn't noticeable -- though if you look carefully, the underline is a bit closer to the text in the top example than the lower one, so the same issue does exist, just not sufficiently to hit the text and start skipping.)
So the root of the issue seems to be that when dominant-baseline is set to middle (or central), the text is shifted lower, but the underline does not shift along with it.
Comment 9•5 years ago
|
||
Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3 (Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3 (normal.)
Comment 10•5 years ago
|
||
Testcase that shows the issue with the dominant-baseline values middle, central, and mathematical (works on both macOS and Windows, at least; results on Linux will depend on the serif font available).
Comment 11•5 years ago
|
||
Looks like the code we use to "recover the correct baseline" in nsTextFrame::GetTextDecorations is bogus for SVG text elements, where we don't really have vertical-align adjustments happening.
Comment 12•5 years ago
|
||
Updated•5 years ago
|
Updated•5 years ago
|
Comment 13•5 years ago
|
||
As noted in phabricator, I think the main issue here is actually that we're mishandling dominant-baseline; filed bug 1638836 about that. When that is fixed we can revisit this and see if there's still a problem.
Comment 14•2 years ago
|
||
The patch in bug 1638836 fixes this too.
Description
•