jdecked / twemoji

Emoji for everyone.
https://jdecked.github.io/twemoji/v/latest/preview-svg.html
MIT License
897 stars 60 forks source link

Source files for SVGs? #14

Open 12Me21 opened 1 year ago

12Me21 commented 1 year ago

Are the SVGs in this repo the only (accessible) versions which exist, or are there source files somewhere which are easier to edit?

(also worried about the quality gradually degrading over time, if the svgs are being repeatedly imported/edited/exported by an image editor)

smiba commented 1 year ago

An SVG does not degrade in quality, it's a text (XML) based format. Try and open any SVG in a text editor of your choice and you'll see

12Me21 commented 1 year ago

Ideally, yes, but not in practice.

For example: the T-Rex emoji was edited at some point, reusing features from the original (notice that the mouth and part of the head are the same, just flipped and rotated and scaled slightly) but, the new version has a visible seam around the mouth, and several extra paths layered on top of each other <?>

old <?> new <?>
(I've noticed several minor issues like this while working on a twemoji opentype COLR font)

more importantly: all the SVGs in this repo use only fills, no strokes (anything that looks like a stroke is actually a filled path) these are difficult to convert back to real strokes for editing, (at best, you'll still lose some precision)

boywithkeyboard commented 1 year ago

@12Me21 there is also https://github.com/boywithkeyboard/twemoji-svg (published as @twemoji/svg), which contains only a minfied version of all SVGs and isn't as much cluttered.

As for quality, as @smiba already mentioned, SVG files can be scaled up and down without quality loss, unlike PNG or JPEG files.

Crissov commented 1 year ago

Although not minified to the fullest extent possible, the SVG files in the assets folder have been processed by svgo and are not well suited as source files. I suppose the original image files were stored in a proprietary format used by some editor (perhaps .ai) and are now somewhere lost or locked inside Twitter, not part of the forkable CC-BY FOSS release. Too bad.

For projects that use SVG as their development format, it makes sense to have a separate set optimized for distribution, i.e. one in /src and one in /assets.

theotheroracle commented 1 year ago

inkskape for example keeps its editor info in the svg files