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

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

Open
patcon opened this issue Aug 12, 2020 · 7 comments
Open

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

patcon opened this issue Aug 12, 2020 · 7 comments

Comments

@patcon
Copy link

patcon commented Aug 12, 2020

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

@microfauna
Copy link
Contributor

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
Copy link
Author

patcon commented Aug 12, 2020

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
Copy link

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?

@microfauna
Copy link
Contributor

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
Copy link
Author

patcon commented Aug 13, 2020

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
Copy link
Contributor

arecvlohe commented Aug 16, 2020

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
Copy link

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

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

4 participants