-
Notifications
You must be signed in to change notification settings - Fork 73
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
Better Fallback #74
Comments
Interesting! Thanks for working on this idea. I've always wondered if/when someone would figure a way to make these better. I'll try this out. We need some comparisons posted to this issue. |
Wow, this looks awesome. I was about to create a similar (but inferior) issue before I found this... |
I guess I am probably boar'd today! I made another attempt. I personally prefer the monochrome font to use thicker lines and fill in all “dark” regions of the emoji, since that blends better with the typical sans-serif system UI fonts.
So here are my experiment results. @adyeths's script For the Belarus flag, my new script is not perfect but the result is recognizable: However, my script is agonizingly slow, so maybe some optimization needs to be done... EDIT, ouch, it seems the current list of thresholds is not enough... |
I had experimented with trying to preserve some of the fill characteristics but I was never quite happy with the results. It's not bad but I believe it could be improved. Here is the convert command that I used for this in case you want to experiment with it.
|
@nedevel I'm building this right now with @ahyangyi script. It is so slow 🐢 Interested to see what happens though 🤷♂️ |
@ahyangyi Wow. It is so so so slow. 20mins for the regular build vs hours and hours. I'm timing this. It wouldn't be bad if the files were generated then committed. |
😆 This is quite a bit longer than the regular build:
20mins vs 10.5hrs |
Added to the current release. I don't intend to make this the default though, because of the 10.5hr build. Try it out. If someone can determine an even better process which doesn't take as long I'll be happy to implement it. |
Rebased for 13.1.0 on https://github.com/eosrei/twemoji-color-font/tree/thickfallback I don't to build this myself due to the 10+ hr build time. |
I improved a little bit more how to process the SVG images and ended with this script (Bash). You need the Image Magick binary from the main page in the same location as the script for it to work. Also a folder called "input" with the SVG images. https://github.com/Humming-Owl/scripts/blob/main/svgtobw.sh It will create a "final" folder with the resulting images. |
It occurred to me that rasterizing, converting to black and white, and then tracing the images was completely unnecessary. So here's a significantly faster way to make black and white fallback svg's using only sed.
|
One more update from me... I made a simple python script to convert the svg's to black and white, with an attempt at adding fills where they seemed appropriate. source is here -> https://gist.github.com/adyeths/ec20a69e35f2817110aeb13df7ed8b43 |
I was thinking that the automatically generated black and white fallback should be better than it currently is, so I started playing around with trying to come up with a better way to automatically create them. I think I can have come up with something that works.
Here are examples of the commands that I came up with while experimenting:
The convert command does all the magic. I'm sure it could be tweaked to produce even better results, but this produces quite nice results.
The text was updated successfully, but these errors were encountered: