-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-text][css-fonts] Override (Emoji) Variation Selectors #1144
Comments
The question of whether to have a I personally like
|
Is the restriction to emoji intentional? I would be useful to be able to apply this to color fonts as well. In other words, be able to turn color glyphs on or off:
|
@RoelN The overriding variation selectors part is special to emojis (although it could be applied to other sequences in StandardizedVariants.txt). In #352, I originally wanted to cover color fonts as well, but that was not considered helpful: WG members and other participants – myself included – got confused, the discussion got side-tracked. That's not saying it's a bad idea per se. |
Variation sequences are assigned such that accessing the glyphs in a particular collection might use VS01 for one base character but VS02 for another. What’s more, a particular VS might result in a different glyph depending on the region. Therefore, rendering as if a non-VS15-non-VS16 variation selector was applied to every character is meaningless and is author-hostile. (VS15 and VS16 are special because their meaning is consistent across characters and regions, but this isn't true of the other variation selectors.) |
Why would you want to override the source content's use of VS15 or VS16? Are authors asking for this? I've heard authors asking for a default, but not for an override. |
Even the editors of UTS#51 are asking for this. We've been there before, e.g. #352 (comment) and #352 (comment). You are right that VS 15 and 16 are special in that they have defacto semantics, whereas the other variation selectors are arbitrary for math characters, but VS-1 consistently selects the dotted form in Burmese, reversed shaping behavior for Phags-Pa, and an alternate form for isolate Manichaean letters. Mongolian VSs are also somewhat regular, but are not part of the enumerated series of generic VSs. |
Can you point to the specific text you're referring to? I can't find them from the links. They read to me that requesting the ability to choose, not the ability to override the source. |
Most symbol fonts like Font Awesome are using PUA characters (exclusively) because authors that use them wish for consistent symbol design and do not want the characters which have Unicode emoji equivalents to be displayed with the OS default emoji font or graphics. The text of #352 (comment) paraphrases an email I received from Mark Davis. I could cite it here verbatim if that's considered okay.
It's unrealistic to assume a closed system where either only VSs or “higher-level markup” controls the display. The web platform has to deal with a mix of both.
These are currently limited to specifying a baseline preference, not overrides.
This is the status quo. The original UTC request from 2015 is based upon L2/15-314:
This is also only about the default presentation, as noted by i18n WG. The question from Stackoverflow I already cited shows that some authors want to be able to reliably treat emoji glyphs like any other monochrome text glyph and not like a bitmap with inherent, fixed colors. |
I'm for overrides. Authors should be able to style text the way they want. This could definitely come in handy. For example, I might be designing a social media oriented site, with an expectation of showing emoji, but users might copy/paste and submit text that includes vs-15 unwittingly. Most users do not know about or understand how to type/delete variation selectors, so this could cause a problem where users complain they aren't seeing emoji when they should be. Or, I could be designing a site (or a blog theme, to be redistributed freely) where headers should always display emoji, as a deliberate style choice, regardless of whether a vs-15 was accidentally included. On the contrary, as Crissov linked to, some folks really do need to be able to style things as text, to make sure they have the expected visual, and to aid accessibility by ensuring high contrast, or even just to be consistent with surrounding text. Being able to style with And typing/deleting variation selectors is cumbersome. Many I would presume don't know how. A css style should be able to force consistency. (On the other hand, once these proposed CSS controls are implemented, and VS-16/VS-16 behavior is properly standardized, it might be more obvious that the VS characters need to be entered correctly, and the impetus could be on the person who provides the text to make sure they are providing the correct presentation (i.e. Typing correctly, or else copying/pasting from the right source). I prefer that site operators have the option of overriding, though.) (Deleted my comments from before, as they were based on a misunderstanding.) |
Unless @kojiishi has anything to add, it seems like there's consensus about overrides. I'll add the following syntax to the spec: font-presentation: auto | (text | emoji) override? ... and then close this issue. |
I'm good to add, but I can't read what i18n/UTC wants about priority. Could we ask them back about their recommendation? I think we have 2 or 3 mechanism to choose; VS, this property, emoji generic family (is this still alive?) I just want we agree on priority with UTC. |
Great to see progress on this, but W3C should definitely consult UTC again before deciding on a Fonts-only solution. They might favor an approach that allowed higher-level control over variation selectors, because it's somewhat similar to case transforms. |
Sad to see it didn't make the FPWD. I hope it'll get figured out soon. |
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: Override (Emoji) Variation Selectors<dael> Github: https://github.com//issues/1144 <dael> fantasai: Some discussion about having font-varient-emoji give the default presentation for emoji in the text. Text can have a variation to say display as graphic or text and that overrides the font-varient default. <dael> fantasai: This was opened to say the author should be able to override the text and they suggested syntax was to add an override keyword. <dael> fantasai: Is this a feature we want? If so, is this the syntax? <dael> TabAtkins: I'm not seeing the use case in the GH issue. We often let specific override general here. <dael> Chris: I agree with TabAtkins. This is a lot like changing what the text content is which is not styling's job. <dael> fantasai: I"m also skeptical there's a use case. One I can think of is in the user style sheet. I would lean toward not unless there's a clear use case. <fantasai> s/not/not adding/ <dael> TabAtkins: I'm seeing a bunc hof specific use of the override character and I want to fix that. I suspect the use of the override is nil. That can be added in the future so no loss on not doing it now. <dael> Chris: Right.. <dael> Chris: I also see Christoph asking us to liase with unicode. Does he think they have a different solution? I can't follow the argument. <dael> fantasai: HIs original idea was it's a text tranformation that inserts the variation selector, but I don't see why we care. <dael> fantasai: I'm not seeing a strong use case and I think we should close until we get an actual use case. <dael> Chris: Suggesting close no action? <dael> fantasai: Yeah, with that we would reconsider with an actual use case. <dael> fantasai: That made it worth impl and testing time. <dael> Chris: mmmmm. <dael> Chris: I also see Raul asking about using this in general. Do we have an answer for him for how to do that? It seems like a seperate sub-issue. <dael> fantasai: Is there a reason they won't be controlled by this prop? <dael> Chris: Yeah, they're not variation selectors to do that. At the moment if you support color glyphs and this format you just display in color and maybe the user wants monochrome. That sounds more style-like. <dael> Chris: I guess I could ask him to re-raise that as a seperate issue. <fantasai> https://github.com//issues/1144#issuecomment-291458684 <dael> fantasai: This comment ^? <dael> fantasai: That's a good quesiton because is the current feature restricted to emoji or effect all glyphs? <dael> Chris: Right. I'm not fully up on variation selectors. <dael> fantasai: If font-varient-emoji effects more than emoji we need a different name. <dael> Chris: That one is only emoji according to unicode. <dael> ACTION Chris ask Raul to re-raise https://github.com//issues/1144#issuecomment-291458684 in a seperate issue <trackbot> 'Chris' is an ambiguous username. Please try a different identifier, such as family name or username (e.g., chris, ChrisWilson). <fantasai> https://github.com//issues/1144#issuecomment-294369645 <dael> Chris: Myles had agreed to this and wanted to add the override. Do you think he'd be okay with closing it? <dael> ACTION ChrisL ask Raul to re-raise https://github.com//issues/1144#issuecomment-291458684 in a seperate issue <trackbot> Created ACTION-861 - Ask raul to re-raise https://github.com//issues/1144#issuecomment-291458684 in a seperate issue [on Chris Lilley - due 2017-08-23]. <dael> Chris: I see Myles removed the needs edits. I'm feeling less comfortable about just closing. What's the sense of the people in the room? Do we close and let Myles object? <dael> TabAtkins: I believe so. I've read through more and the jutification of the override is really choosing the defaults. <dael> RESOLVED: Close issue 1144 no change <dael> gsnedders: We missed Definiteness of flex items' main size depend on flex-basis's definiteness <Chris> ?? <Chris> oh right |
Twitter (on its web site) replaces every character that can have an emoji representation by its respective Twemoji image, regardless of Variation Selectors. This is effectively like If that does not prove demand, I don't know what would. |
"Effectively", but not actually. They're doing something completely different by replacing with their own images; the question of variation selectors becomes moot. If they were using native emoji, but wanted to make sure that they showed up in image form when possible, we don't know if Until/unless variation selectors actually become widespread enough that sites start wanting to care about them, we have no idea what the demand would be, and the WG doesn't think there's a strong reason to pursue this absent any active author interest; right now the demand is purely theoretical. |
Yes, they are using their own images, because there is no way to supply a custom emoji font to browsers across platforms. They could easily honor VS-15 and VS-16, but they do not. This is a very strong indication that Twitter et al. would prefer the same behavior if they could rely on emoji fonts. The Hardly anybody ever enters variation selectors deliberately and manually, at least not for emojis. Everybody relies on emoji picker GUIs to inject them, some of which don't do that. Then you get ❤ instead of ❤️, whereas the other heart emojis always retain their color. However, I have shown evidence that designers sometimes want to force emojis to render in a monochrome style, so they can use CSS effects and tricks on them like they can do on any other (printing) character – or just print them better/cheaper. Take the hearts again, they would all look indistinguishable from each other if all colors just became black, but as a iOS also very aggressively enforces its colorful emoji glyphs, by the way. This can be obtrusive, especially in the case of icon fonts (like Font Awesome) which circumvent this problem by using PUA code points. Non-standard code points can negatively affect accessibility. If CSS allowed designers to enforce |
That's the sticker here. The only point of an override option is to override usage of the VS-15/16 selector; as far as we can tell, approximately nobody is using those. Any pointer to some application currently wanting all their emoji in one form vs another is, currently, just an argument that this property is wanted in its current form, where it can switch the emoji into one form vs the other. It's not immediately obvious whether any particular usage would want to specifically override the variation selector if it was specified; many might very well be fine with honoring them. And even if they'd want to, the question is still how necessary/common it is, vs just letting the display occasionally be weird, or requiring the author to clean the data they're displaying to remove the variation selectors. We don't provide all possible text-transforms, after all, just a handful that seem sufficiently useful to justify speccing, implementing, and testing. Currently we don't think overriding variation selectors qualifies here; we're open to changing our mind if/when authors start actually experiencing variation selectors in user-entered content and complaining about it. |
Unlike VS-15, VS-16 is used a lot in the wild. Anyway, maybe If @litherum agrees with this resolution (and if |
I agree with the resolution. |
Continuing #352 and leaving #1092 aside for now, the draft Fonts property could be left as is, but then should be accompanied by a Text property able to override variation selectors 15 and 16 (and possibly others as well).
Possible solution with CSS-Text
none
: no changestext
: same as15
emoji
: same as16
StandardizedVariants.txt
Possible solution without CSS-Text
or
The text was updated successfully, but these errors were encountered: