Closed Bug 1470075 Opened 6 years ago Closed 1 year ago

make ch units compute to the vertical advance of the zero glyph, in vertical upright writing modes

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: heycam, Assigned: jfkthame)

References

(Blocks 1 open bug)

Details

(Whiteboard: [wpt-triaged])

Attachments

(1 file)

This is one case I didn't handle in bug 282126.  Per bug 282126 comment 34, only Safari does this correctly currently.

This probably will need some refactoring of the way we compute metrics -- maybe to have a single metrics object that has both horizontal and vertical measurements on it.  Or at least gfxFont::FontMetrics::zeroWidth should be renamed so it doesn't always sound like a horizontal measurement.
Cameron,

It seems to me that Firefox 60.3.0 ESR (buildID=20181023221722) and Firefox 65.0a1 (buildID=20181123220228) both make ch units compute to the vertical advance of the zero glyph, in vertical upright writing modes:

http://www.gtalbot.org/BrowserBugsSection/CSS3Values/ch-unit-011.html

What am I missing?

More ch unit tests:
http://www.gtalbot.org/BrowserBugsSection/CSS3Values/
Firefox (60.3.0 ESR and 65.0a1) also pass this test:

http://test.csswg.org/suites/css-values-3_dev/nightly-unstable/html/ch-unit-002.htm

and this modified (without resorting to ChTestShortZero.woff) version of your ch-unit-009 test:

http://www.gtalbot.org/BrowserBugsSection/CSS3Values/modified-CameronMcCormach-ch-unit-009.html
Whiteboard: [wpt-triaged]

Cameron,

Is this bug still happening?
Are the mentioned tests incorrect?

Flags: needinfo?(cam)

Sorry for not responding to your comments, Gérard. I can't look into this right now, but CCing Jonathan in case it's something he has time to verify.

Flags: needinfo?(cam)
Severity: normal → S3

This still fails in ch-unit-017, because we don't actually measure the proper advance of the zero glyph when setting up vertical-mode font metrics. So the result looks OK in common cases where zero has the same (vertical) advance as all the other glyphs, but fails if it actually has a different vertical advance.

Assignee: nobody → jfkthame
Component: CSS Parsing and Computation → Layout: Text and Fonts
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/61429b038488
Use the proper vertical-advance of the <zero> glyph when setting up vertical-mode font metrics. r=emilio
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: