nativesintech / indigemoji

Indigenous emoji for your (Slack | Discord | Discourse)
MIT License
23 stars 2 forks source link

Support cropping of unprocessed SVGs, so emoji shape more visible #1

Open patcon opened 4 years ago

patcon commented 4 years ago

Hi! Just tried to run the scripting parts here, so I could offer a PR on the project. I realized that's still WIP (which is a-ok), but also saw that some of the emoji have a ton of whitespace.

Would it be helpful if an image like this were cropped a bit? https://upload.wikimedia.org/wikipedia/commons/f/fa/Anishinabe.svg

If so, I'm trying out using this tool, and perhaps we could add it to the scripting once that parts ready to receive contributions :) https://github.com/cncf/svg-autocrop

Let me know! Thanks for sharing the project on Twitter! ❤️

cd indigemoji
npm install svg-autocrop
mkdir -p input output
(cd input && wget https://upload.wikimedia.org/wikipedia/commons/f/fa/Anishinabe.svg)
npx svg-autodrop
# An error throws related to compare.html, but ignore
# New file now at `output/Anishinabe.svg`

Original

Cropped

nicksahler commented 4 years ago

Ah, I can take a swing at adding this to the SVG processing step. I'd prefer it be called directly in JS rather than from the CLI (which should be possible if it's callable from npx), but am working on breaking each of the steps in index.js into callable commands (will get to this tonight) - at that point we can add cropping as an independent step!

patcon commented 4 years ago

ok sounds good! No rush! Not sure how it'll work with colored backgrounds, so might be a better solution.

Also, this only works for SVGs, so a bit brittle. Might be possible to use a more general tool

I'll check back

Mehequanna commented 4 years ago

I'm curious if this is something we really want to do? From the readme, Indigemoji is a collection of indigenous flags. Flags are generally a particular rectangle/square shape. By cutting out the white space, wouldn't we be changing the flag to an emblem?

nicksahler commented 4 years ago

I agree actually and also wouldn't want to change the flags from their original state / reduce their integrity- but we could still do this and add them as extra flags with a different prefix. like "logo-anishnaabe-2" or just numbered suffixes.

patcon commented 4 years ago

Ah jeez, you're absolutely right. Sorry, missed that they had the flag prefix, and was thinking they were more like crests or seals. As flags, they certainly shouldn't be cropped...!

Looking at how the more complex Unicode flags have been compacted, seems like it's just a lot of hand-tuning, which is maybe a neat longer-term goal! Unicode has a process for getting flags into the set, after all :)

🇹🇲 🇧🇿 🇧🇹 🇧🇾 🇲🇽 🏴󠁧󠁢󠁷󠁬󠁳󠁿 🇦🇫 🇪🇸

EDIT: I do support the idea of offering a cropped alternative of central element of flags, if y'all think it's something users would want.

arecvlohe commented 4 years ago

Indigemoji is a collection of indigenous flags.

I think Indigemoji can and should be more than flags. Flags is a good start though! Cropping may become more important later on so I think this is still a good idea to think of long term

Mehequanna commented 4 years ago

Agreed. I'm all for adding other types. I was just worried about editing an actual flag.