Open Bug 1633109 Opened 5 years ago Updated 2 years ago

svg underline issue with centered text

Categories

(Core :: Layout: Text and Fonts, defect, P3)

75 Branch
defect

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.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → SVG
Product: Firefox → Core
Attached file reporters testcase (obsolete) —
Attached file font
Attached file reporters testcase
Attachment #9143354 - Attachment is obsolete: true

Seems fine on Mac. layout/text probably makes more sense for this.

Component: SVG → Layout: Text and Fonts
Attachment #9143328 - Attachment is obsolete: true

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.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3

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.)

Severity: normal → S3

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).

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.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #9149078 - Attachment is obsolete: true

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.

Assignee: jfkthame → nobody
Status: ASSIGNED → NEW
Depends on: 1638836

The patch in bug 1638836 fixes this too.

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

Attachment

General

Creator:
Created:
Updated:
Size: