w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.49k stars 661 forks source link

[css-writing-modes] baseline tables figures are confusing, do not correspond to OTF BASE table #3439

Open macnmm opened 5 years ago

macnmm commented 5 years ago

https://www.w3.org/TR/css-writing-modes-3/images/script-preferred-baselines.gif

https://www.w3.org/TR/css-writing-modes-3/images/baselines.gif

Both of these images do not convey a usable embox top or bottom baseline that is the normal line top and bottom for CJK text. The embox top and bottom can be obtained from the 'ideo' baseline and the point size of OpenType fonts' BASE table. These are the preferred measuring points for typographic line top and bottom, and leading measurements for CJK text. They are also the alignment points to be used with text grids and in mixed sized text.

fantasai commented 5 years ago

Heh. These figures are ancient, they were assembled before I even joined the CSSWG. :P @dauwhe Can you help?

dauwhe commented 5 years ago

Here's a sketch as I'm trying to figure out what's going on

baselines

@macnmm, so we'd set the ideographic baseline to -120 because of the IDEO baseline value from the metrics, and then add 1000 to that to get the embox top? In this case that matches all the ascent values, but that doesn't appear to be true all the time.

I have some CJK fonts where ascent + descent does not equal the units per em (Arial Unicode MS), but I haven't found one with a base table yet.

dauwhe commented 5 years ago

Here's a font where text-top and text-bottom seem distinct from ideographic top and ideographic bottom.

notosansjp
frivoal commented 5 years ago

@dauwhe Have you been able to make a figure you're happy with?

dauwhe commented 4 years ago

@dauwhe Have you been able to make a figure you're happy with?

The goal was to make a figure @macnmm is happy with :)