W3C home > Mailing lists > Public > public-css-archive@w3.org > August 2020

Re: [csswg-drafts] [css-inline-3] Propose N/A value for em-top and em-bottom baselines (#5380)

From: Koji Ishii via GitHub <sysbot+gh@w3.org>
Date: Sun, 09 Aug 2020 15:23:22 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-671065021-1596986600-sysbot+gh@w3.org>
> Are browsers prepared to ship a breaking change?

Blink once implemented, but hasn't shipped this property yet due to these concerns.

> It also seems better to move this discussion to whatwg/html.

Agreed, but can you tell me a bit more details how? I think there are two sides of this discussion. In #5312 logic, when the first "if" clause succeeds:
> if iTop | iBottom | iCentral:

I'm fine to use this logic, and IIUC @jfkthame as well. If @litherum is fine too, we can define this part in CSS. This logic also matches [OpenType ideographic em-box], so I hope OpenType font experts would agree too. /cc @astearns @macnmm @kenlunde

The problem is in the "else" clause. [OpenType ideographic em-box] defines this case as "_ideoEmBox cannot be determined for this font_". HTML would want to know this condition -- when the logic hit this "else" clause -- then it can decide to return a synthesized value, `undefined`, 0 or negative value.

So I'm wondering, maybe it is CSS to first agree that this value can be determined only under certain conditions. Is my understanding correct, or is it better first discuss at html? In Blink, I'm talking to @yiyix, we're happy to follow however is easier for people, a guidance on how to proceed this is appreciated.

> In my mind, at least, em-top and em-bottom are expected to provide the alignment positions used by Canvas2d textBaseline=top and bottom, so they can't be undefined or zero or whatever.

Blink uses [text-over] and [text-under] for them today, which is, as you said, not very interoperable unfortunately. I don't have a good idea how to make them interoperable, but we have a proposal to give authors an opportunity to opt-in to interoperable font metrics in #4792.

BTW, Canvas2d `textBaseline` not well-defined is a very good point. I've been discussing with @yiyix about how to map these Canvas values to the concepts in CSS. Maybe this is a good opportunity to define them better?

[OpenType ideographic em-box]: https://docs.microsoft.com/en-us/typography/opentype/spec/baselinetags#ideographic-em-box
[text-over]: https://drafts.csswg.org/css-inline-3/#text-over-baseline
[text-under]: https://drafts.csswg.org/css-inline-3/#text-under-baseline

GitHub Notification of comment by kojiishi
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5380#issuecomment-671065021 using your GitHub account

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 9 August 2020 15:23:23 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:13 UTC