Re: [csswg-drafts] [css-fonts] Clarification font-variant-emoji should not affect characters `0-9#*` (#11014)

> The `unicode` keyword doesn't turn all emoji into color style, that's why we need to set it to the emoji keyword.

You can use the `emoji` keyword if you use the `font-variant-emoji` property correctly and with the right granularity. Or you can use VS15/VS16 with the `unicode` mode of the property.

From your original report, and as @jfkthame explains above, one correct way to upgrade the arrow in `⬆379 kB/s` is to place a span around the arrow and not apply `font-variant-emoji: emoji` to the full `<div>` element, another correct way is to use VS16 for the arrow and set `font-variant-emoji` to `unicode`. 

> `font-variant-emoji: emoji` should not change the font-family of a digit at any time.

Why not? Several emoji fonts contain color digits, not only for the keycap sequences. Emoji 2.0 in Unicode introduced emoji digits.

@yisibl Are you adovcating for a specific text with exceptions for codepoint ranges in how the font-variant-emoji property is applied? In that case we would end up with something roughly saying: "use unicode properties, except for... 0-9"?

The request to exclude digits from `font-variant-emoji` would be an arbitrary Unicode exception for the web. This is a distinction that from the Chrome side we oppose to making in the CSS fonts spec. What would we do we do with `*`, and `#`, what do we do with the trademark sign, the heavy plus sign, etc. - this would make for a really odd precedent.

From the Chrome side, we have strict implementation constraints to not deviate from Unicode for character properties. We include ICU, and we use [emoji-segmenter](https://github.com/google/emoji-segmenter) - which are general purpose libraries for Unicode behavior. If we would do a web-specific special casing of numbers, this causes additional complications in using these libraries - and we do not want to override their behavior. 

* Digits have the [`Emoji=Yes` property](https://unicode.org/Public/16.0.0/ucd/emoji/emoji-data.txt) and so with a VS16 they can be upgraded to emoji presentation. 
* Multiple emoji fonts support colored digits, not only colored digits with keycaps.

@yisibl If you strongly believe standalone numbers should not be emoji, I believe this would instead be a discussion for Unicode to remove the Emoji character class from the digits, or for requests to emoji font producers to remove the colored digits from them. 

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 27 November 2024 10:31:09 UTC