HazAT / badge

Add a badge to your app icon
MIT License
966 stars 87 forks source link

[WIP] Working with svgs + new geometry options #41

Closed jamesdaniels closed 7 years ago

jamesdaniels commented 7 years ago

Hey Daniel, I wanted to open a PR for this work in progress change I have that manipulates SVGs in badge. This leads to better quality badges when resized and makes an especially big difference on Android.

Just wanted to start a conversation around this change.

Curb was added as a dependency due to a problem in my local environment, that keeps net/http from requesting from shield.io. I haven't figured out what this is yet. I'll see about at least separating this from the PR.

rsvg-convert is now a CLI dependency, as even when compiled with SVG support magick still has compatibility issues (inexplicable black badges on Travis for example). I need to add some error handling here.

I added new options, shield_scale and shield_geometry which allow you to resize the shield and move it around respectively.

Example usage: bundle exec badge --glob "/../app/src/main/res/**/ic_launcher.png" --shield $SHIELD --no_badge --shield_geometry "+0+25%" --shield_scale 0.75

Let me know what you think!

HazAT commented 7 years ago

Hey, Thanks for the PR ... That's pretty awesome that will improve the overall quality of the shields by a lot 🎉 I left a few review comments.

HazAT commented 7 years ago

@jamesdaniels I had some time and merged it locally, thx again for your PR 🥇 Update to 0.8.0

jamesdaniels commented 7 years ago

Thanks and glad it made it in! Sorry didn't have time to address your feedback myself.