Skip to content
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

Noto Color Emoji broken on Chrome #588

Open
applecuckoo opened this issue Oct 22, 2022 · 12 comments
Open

Noto Color Emoji broken on Chrome #588

applecuckoo opened this issue Oct 22, 2022 · 12 comments
Labels
bug Something isn't working

Comments

@applecuckoo
Copy link

applecuckoo commented Oct 22, 2022

Describe the bug

EDIT: I've checked the .woff2 files being served using the Wakamai Fondue beta and confirmed that the font files only have an SVG table (OpenType-SVG), which only works on Safari/WebKit based browsers and Firefox (caniuse.com). Chrome has chosen not to implement OpenType-SVG in favour of COLRv1, and it's being supported by all major browsers at the moment except Safari, they had a negative stance on the proposal. See caniuse.com. So I think that the font should also be built with OpenType-SVG, until WebKit decides to implement COLRv1 into their system.

Steps to Reproduce

  1. Download the served files from Fontsource
  2. Upload the files to Wakamai Fondue and check under the 'Color' section.

Expected behavior

I expected the glyphs to be visible but they were not.

Version

4.5.2

OS

MacOS

Browser

Google Chrome

Additional context

This will also impact Edge and Opera users.

@applecuckoo applecuckoo added the bug Something isn't working label Oct 22, 2022
@ayuhito
Copy link
Member

ayuhito commented Oct 22, 2022

Can you confirm this is an issue with the NPM package? Technically if it is related to the font itself, that's probably an upstream issue. If it's related to the packaging of the font and its files, then we could dig more into it.

The first thing that pops into my mind is that this may be a user-agent problem. Google determines what files to serve depending on the user agent and perhaps the new COLRv1 features require a newer user agent. But I would expect a working fallback regardless...

@applecuckoo
Copy link
Author

@ayuhito COLRv1 was created by Google themselves, the annoying bit is that building Noto Emoji takes a few hours (I'm even building a COLRv1+SVG version as I type this). Fortunately the compression is very quick.

@henrikvilhelmberglund
Copy link

Is there any way to solve this? Seems strange that a Google font wouldn't work in Chrome.

@applecuckoo
Copy link
Author

applecuckoo commented Dec 10, 2022

I've put my COLRv1+SVG build in a GH repo, should just need to be subsetted and it should work. Again, a Wakamai Fondue check shows that the COLR table is nowhere to be found, so the table is probably not being packaged. The build is here. @rsheeter might be able to explain.

@ayuhito
Copy link
Member

ayuhito commented Dec 10, 2022

If there is a user-agent that fetches both tables in one file from GF, that would be a viable solution for this until all browsers support COLRv1 or SVGs.

The only trade-off is file sizes I'm assuming.

@rsheeter
Copy link

Can you clarify which font is broken on Chrome exactly? - https://fonts.google.com/noto/specimen/Noto+Color+Emoji is working fine for me.

Note that the Google Fonts css api will pick what color format to send based on the user agent's capabilities. You should get a COLRv1 font on modern Chrome, SVG on Safari, etc.

@applecuckoo
Copy link
Author

@rsheeter Apologies, this is about the fontsource package, not the one offered through the GF API.

@rsheeter
Copy link

Oh I'm sorry, I completely missed what repo we're in and assumed it was in Noto Emoji :)

The copy in https://github.com/google/fonts/tree/main/ofl/notocoloremoji (upstream of Google Fonts) should have both SVG and COLR.

@ayuhito
Copy link
Member

ayuhito commented Dec 12, 2022

@rsheeter, is there a possibility we can acquire a user-agent that covers both tables? Possibly a fallback that occurs when the CSS API can't determine exactly what browser it might be?

We fetch fonts from the CSS API directly using these user agents.

Thanks!

@ayuhito
Copy link
Member

ayuhito commented Oct 16, 2023

Should be resolvable when #39's subsetter is implemented.

@satoren
Copy link

satoren commented Dec 28, 2023

It does not appear to be working here either. https://fontsource.org/fonts/noto-color-emoji

@kazie
Copy link

kazie commented Jan 1, 2024

I have been troubled by the color emojis not working in Chromium (but does in Firefox) too.

When the font-family gets set in chrome all emojis are blanked - while in Firefox they render as wanted for me.

What I am trying to do is having a small page with emojis showing Noto Color Emojis, since I want all kinds of devices to have the same experience (instead of Samsung phones and Apple phones showing different emojis).

Firefox - OK!
1704145576_grim

Chromium - No fonts?!
1704145548_grim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants