googlefonts / nanoemoji

A wee tool to build color fonts.
Apache License 2.0
239 stars 19 forks source link

nanoemoji conversion misses ~5% of noto color emojis when converting from SVG to SBIX #467

Open folsze opened 3 months ago

folsze commented 3 months ago

Steps to reproduce:

I used this repository folder as a source for nanoemoji:

https://github.com/googlefonts/noto-emoji/tree/main/svg

I cloned the repository locally. I ran this command:

nanoemoji --color_format=glyf_colr_0 ./*.svg

This resulted in a .ttf file inside the build folder.

While this file displayed almost all emojis perfectly without any rendering delay issues etc., even on safari macos, it did not display those emojis with the noto style and instead used the native macos style:

Mountain (⛰️): U+26F0 U+FE0F Snow-Capped Mountain (πŸ”οΈ): U+1F3D4 U+FE0F Cityscape (πŸ™οΈ): U+1F3D9 U+FE0F Comet (β˜„οΈ): U+2604 U+FE0F Shamrock (☘️): U+2618 U+FE0F Studio Microphone (πŸŽ™οΈ): U+1F399 U+FE0F Framed Picture (πŸ–ΌοΈ): U+1F5BC U+FE0F Shield (πŸ›‘οΈ): U+1F6E1 U+FE0F Pick (⛏️): U+26CF U+FE0F Hammer and Pick (βš’οΈ): U+2692 U+FE0F Hammer and Wrench (πŸ› οΈ): U+1F6E0 U+FE0F Dagger (πŸ—‘οΈ): U+1F5E1 U+FE0F Crossed Swords (βš”οΈ): U+2694 U+FE0F Desert (🏜️): U+1F3DC U+FE0F Classical Building (πŸ›οΈ): U+1F3DB U+FE0F

(this is just an excerpt, I am sure there are more emojis that nanoemoji failed to convert correctly for Safari)

This result of such error can be seen live here: https://emoji.julien-marcou.fr/ when selecting "Noto Color Emoji" with the bottom right dropdown and then using πŸ”Ž to search for "mountain" ⛰️

Here is the source code: https://github.com/Julien-Marcou/Unicode-Emoji-Picker

do note: this person used a .woff2 file for the source code but a ttf file did just the same error for me for a local project, the font files also have the same filesize as in the example above. I don't know how exactly this person created a woff2 with nanoemoji, instead of the .ttf.

This person also mentioned here (https://github.com/googlefonts/noto-emoji/issues/438#issuecomment-2060985522) that they used nanoemoji to convert from noto color emoji to the SBIX format, which is why I am submitting an issue here. You can see the error in this picture live. The two mountains still display native emojis. So it's often related emojis, which might be a good hint to what exactly fails maybe?

image