- From: fantasai via GitHub <sysbot+gh@w3.org>
- Date: Tue, 09 Jan 2024 07:45:13 +0000
- To: public-css-archive@w3.org
Last time I discussed internally with Nat and Ken, this is where we landed: - If the font supports `halt` applied to the relevant codepoint that we want to trim, apply that. - Otherwise, if the font supports `hwid` applied to the relevant codepoint _and_ the glyph bounds are identical with/without `hwid` (which is a heuristic for “is it the same glyph?”), apply that. - Otherwise, use the regular glyph but synthesize halt by adjusting the metrics. - For some glyphs, this will be cutting off the left or right half. - For others (e.g. middle punctuation) it will be cutting off 1/4 on each side. - In all cases, don't forget to adjust the glyph overflow metrics if the glyph overflows its bounds. The last two are essentially “synthesize the missing `halt`” glyphs in fonts that don't have them. We didn't discuss `chws`/`vchw` specifically, but they don't seem appropriate because for `text-spacing` we want the browser deciding which characters get trimmed, not the font. (Nat was very against using a font feature that makes the decisions about which glyphs to affect, both iirc because the layout engine should maintain control and also because it doesn't work properly across font changes.) So I think CSS Text 4 should specify the use of `halt`, not `hwid` or `chws`; and we can add some suggested synthesis heuristics (we can discuss further also in #8292) for when the font doesn't support `halt`. CC @macnmm @kojiishi -- GitHub Notification of comment by fantasai Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8293#issuecomment-1882555124 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 9 January 2024 07:45:16 UTC