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

corrupted ellipses in SVG files #34

Open
12Me21 opened this issue Apr 30, 2023 · 4 comments
Open

corrupted ellipses in SVG files #34

12Me21 opened this issue Apr 30, 2023 · 4 comments

Comments

@12Me21
Copy link

12Me21 commented Apr 30, 2023

I've noticed that several emojis have differences between their PNG and SVG versions
for example, the beak in chicken:

other examples bat (head/neck shape)

loudly crying face (inside of mouth)

fountain (the water at the bottom)

eye in speech bubble

skull (eyes)

A few more which aren't as easily visible:
- honey pot
- sake
- woman's hat

from what i can tell: this happened when the SVG files were optimized (starting around release 2.5.0),

original shapeellipse

From what i can tell:

  • Originally, the emojis were edited in Adobe Illustrator, and saved as .ai files. (This is a proprietary format, but it stores shapes in roughly the same format as SVG and can be converted losslessly).
  • The SVG and PNG versions were generated automatically from these .AI files.
  • Starting with v2.5.0, the SVG files were optimized, replacing some <path> elements with <ellipse> (and <circle>) elements. (among other changes)
  • The way it detected ellipses wasn't strict enough, and some shapes were mistakenly turned into ellipses.
  • At some point around v12.0, twemoji switched to using the SVGs as sources, and removed the now-redundant adobe illustrator files.

So: the current SVG files still contain those optimization mistakes
To fix this, all SVGs (except the ones from after v12.0) should be regenerated from the most recent .AI files, but with safer optimization settings (or perhaps the same settings, if the ellipse bug has already been fixed)
(here's the last commit before the AI files were removed: https://github.com/twitter/twemoji/blob/7f9de7ceb8962c1b505486e23dee24282385b28b/assets/)

@12Me21
Copy link
Author

12Me21 commented May 13, 2023

Perhaps the best example i've found so far is:

somehow, just one of the eyes was replaced with a circle

@elephantpanda
Copy link

The optimisation has made turned them into "cal-arts" style 😔

@12Me21
Copy link
Author

12Me21 commented Jun 20, 2023

I've even found what appears to be one from v13.0.0:

There's no correct version to compare it to, but i'm fairly certain that at least one of the ellipses at the top of the pot are wrong (perhaps more)

@elephantpanda
Copy link

Not sure what the point of optimising the shapes to be ellipses is? You at most save a few characters from the SVG file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants