text-underline-offset has wrong baseline for vertical text when set to 0
Categories
(Core :: Layout, enhancement, P3)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox69 | --- | fixed |
People
(Reporter: cmarlow, Assigned: cmarlow)
Details
Attachments
(2 files)
When text-underline-offset has been set, and the text-underline-position has not been set, at 0 it should default to the alphabetic baseline of the text. It does this in horizontal mode, but in vertical mode it defaults to the center of the text.
| Assignee | ||
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Here's a sample file I've been using to look at the effect of this locally. Based on what I see here, I think we probably want to tweak things a bit further. Observations...
-
With current trunk code (i.e. without this patch), the
autoposition of the underline looks fine, and thetext-underline-offset:0pxposition looks perfect in horizontal mode (it exactly touches the alphabetic baseline). Insideways-*writing modes, the result looks exactly like the horizontal result, just rotated by 90°, which is what I'd expect. Invertical-*modes, thetext-underline-offset:0pxposition is centered, which is bad, and is what we primarily want to fix here. -
With this patch applied, the
text-underline-offset:0pxinvertical-*modes is much better. (It's hard to say what the exact "correct" position would be, but the result here looks reasonable to me.) However, insideways-*modes, the position has been shifted slightly, such that it's now fractionally away from the alphabetic baseline -- there's a 1px gap or thereabouts. This seems regrettable; those cases looked perfect previously. Can we make sure the fix here only affectsvertical-*modes, and leaves thesideways-*modes unchanged? -
The other thing this example highlights (although it's not a new issue in this patch) is that
text-underline-offsetdoesn't have any effect in vertical mode whenlang=jais in effect, when the underline appears by default to the right of the text. This is probably because we handle this internally by effectively swapping under- and over-line decorations at some point, but I think we need to fix this:text-underline-offsetshould work similarly for all languages and writing modes.
| Assignee | ||
Comment 3•7 years ago
|
||
I've added some code so the underline behaves as before in sideways mode, and I opened up Bug 1562704 for the japanese text and have submitted a potential patch for it on Phabricator
Updated•7 years ago
|
Comment 5•7 years ago
|
||
| bugherder | ||
Description
•