Closed Bug 1574927 Opened 5 years ago Closed 5 years ago

skip-ink is incorrect for sideways (e.g. Latin) text in vertical writing modes after an upright (e.g. CJK) run

Categories

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

defect

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(1 file)

We don't yet implement skip-ink for upright-oriented text in vertical writing modes, because of lack of underlying Skia support (this is bug 1572294).

However, where a run of upright text is followed by some sideways-oriented text, the ink-skipping is also broken for the sideways text.

Testcase:

data:text/html;charset=utf-8,<u style="writing-mode: vertical-rl;
    text-underline-offset: -.2em;">skipping %E4%BD%A0%E5%A5%BD skipping

The underline does not skip correctly under the second occurrence of "skipping". (There are gaps, but they're placed too early, because the advance of the Chinese text is not taken into account.)

This happens because at https://searchfox.org/mozilla-central/rev/5912f376ab6a17afcba2b7654586013158ed64b5/layout/painting/nsCSSRendering.cpp#4102-4107, we skip any glyph runs with vertical-upright orientation when putting glyphs into the Skia text blob, but this means that for any subsequent non-upright glyph runs, textPos will not be correct. We need to update textPos to include the advance of the upright run so that following glyphs will be properly positioned for intercept computation.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8ab443aeac30 Account for the advance of (otherwise-ignored) vertical-upright glyph runs when collecting skip-ink intercepts. r=dholbert
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: