Closed Bug 2095639 Opened 7 days ago Closed 2 days ago

Space glyph is shifted and clipped in upright vertical text

Categories

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

defect

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: calixte, Assigned: jfkthame)

Details

Attachments

(1 file, 1 external file)

Steps to reproduce

  1. Open firefox-upright-space.html.
  2. Compare the AAA and A A columns. Both use writing-mode: vertical-rl and text-orientation: upright. The embedded font maps U+0041 (A) and U+0020 (space) to the same hollow square glyph with a one-em advance.

Actual result
In Firefox Nightly 162.0a1, the middle square in A A is shifted up and to the right. It overlaps the preceding square and is partially clipped. All three squares in AAA render correctly.

Expected result
Both columns should show three complete, vertically aligned squares.

Range.getBoundingClientRect() gives the same vertical offsets for the three characters in each column (0, 48, and 96 CSS px).
For info, it works as expected in Chrome.

Reproduces for me on macOS. This appears to be a Layout issue. I'll send over to them for triage.

Component: Graphics → Layout: Text and Fonts

Interestingly, if I replace the space with   it renders as expected.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/eacb6936a437 https://hg.mozilla.org/integration/autoland/rev/4805515b368a Don't use SetSpaceGlyphIfSimple() in vertical-upright runs, as it doesn't handle offsets. r=layout-reviewers,emilio
Status: ASSIGNED → RESOLVED
Closed: 2 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/65736 for changes under testing/web-platform/tests

Upstream PR merged by moz-wptsync-bot

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

Attachment

General

Created:
Updated:
Size: