- From: Koji Ishii via GitHub <sysbot+gh@w3.org>
- Date: Fri, 31 Jul 2020 23:10:16 +0000
- To: public-css-archive@w3.org
kojiishi has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-inline-3] Propose N/A value for em-top and em-bottom baselines == A follow up for #5312. I'd like to propose using `undefined` in JavaScript for when the font doesn't have none of top, bottom, nor central of em-box. Imagine a case: ```javascript const ctx = canvas.getContext('2d'); ctx.font = '20px Arial, CJKFont'; const metrics = ctx.measureText('日本語'); ``` I think the expectation is to get em-box from the `CJKFont`. Another example: ```javascript ctx.font = '20px Arial, CJKFont1, CJKFont2'; ``` and `CJKFont1` doesn't have BASE table but `CJKFont2` has. Is the expectation to synthesize from `Arial`, synthesize from `CJKFont1`, or use BASE table from `CJKFont2`? Because this is JavaScript API, if author knows that the first available font doesn't have accurate metrics, they can choose options such as synthesize from ascent/descent of the first available font, fallback to the next font, or something else. If browser returns possibly inaccurate synthesized values, authors doesn't have a good way to determine how much they can trust it. WDYT? /cc @jfkthame @litherum @fantasai @annevk @yiyix @macnmm Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5380 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 31 July 2020 23:10:18 UTC