Closed fantasai closed 11 months ago
Variation selectors are FE00 to FE0F.
Note that two VS overlap with the font-variant-emojiproperty to control the same thing: U+FE0E (VARIATION SELECTOR-15) selects text presentation U+FE0F (VARIATION SELECTOR-16) selects emoji-style
We should include all characters with the Emoji_Modifier
property, which are currently all in the Miscellaneous Symbols and Pictographs
block.
From UTR51:
The
Extended_Pictographic
property is used to customize segmentation (as described in [UAX29] and [UAX14]) so that possible future emojizwj
sequences will not break grapheme clusters, words, or lines.
Maybe Extended Pictographic
property is a better category than Emoji
property (it is a superset of the latter).
I think that should be taken into account when defining a range for this generic family.
Also from UTR51 ED-14:
emoji flag sequence — A sequence of two
Regional Indicator
characters, where the corresponding ASCII characters are valid region sequences as specified by Unicode region subtags in [CLDR], with idStatus="regular" or "deprecated".
Oh and there are also valid sequences with keycaps.
U+20E3 = enclosing keycap
The Working Group just discussed Restrict unicode range of emoji generic family
, and agreed to the following:
RESOLVED: a note should be added that ua should filter at the time the user selects the font, or warn the user of the consequences
With the recent resolution of issue: 4442 Don't require browsers to always match every generic font family to a concrete font family, it is now clearer that
a) the other (new) generic font families may not map to at one matched face b) even if they do, there may be no match for a given codepoint.
While the resolution of #4442 says we can, I'm unsure as to whether and how much we should restrict the emoji
generic font family to a particular unicode range, primarily because I remain confused as to what it is for. The description in the spec doesn't help a whole lot: it says what emoji are, but this is a description of what sort of characters they are, not a description of any distinctive property that the emoji
font is supposed to have for these characters (or other characters) compared to any other font that would also have glyphs for them.
emoji
would indeed make more sense in a font descriptor than as a font family.
@font-face {
font-family: Twemoji;
unicode-range: emoji;
}
I’ve opened https://github.com/w3c/csswg-drafts/issues/4573 to add emoji
to unicode‑range
.
I'm still not 100% sure, but the note in https://github.com/w3c/csswg-drafts/commit/3180a465cf87596f308ba49695f69718f55d7926 did help me.
Let me check if I understand this right now:
emoji
isn't supposed to be an emoji font, but effectively the system's emoji font (possibly customized through UA settings), and given a time machine, could reasonably have been called ui-emoji
font-family: emoji, "Foo Roman";
when "Foo Roman" is the font you really want to use, but it contains glyphs for the emoji range which you don't actual want to use, and prefer keeping the system's default.If so: 1) The description of the value should say that this is what it is 2) It needs to be restricted to a range that doesn't include U+0020 (so that it doesn't get considered as the first available font and influences line height of font relative units) nor non-emoji characters (so that it can be put at the top of the font stack without highjacking non emoji characters).
Closed because
Should the
emoji
generic family be restricted to the emoji-relevant unicode range so that it can play well with fallbacks? E.g. 'font-family: emoji, sans-serif`.If so, what is the range of relevant characters? Anything with the emoji property to be sure, but also variation selectors, ZWJ, anything else?