badge: The badge is broken due to librsvg

I just installed badge in my new machine today and after run badge command the icon become broken, but it works fine on my old machine.

before Screen Shot 2019-08-09 at 10 30 48 pm

after Screen Shot 2019-08-09 at 10 29 12 pm

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 39
  • Comments: 31

Most upvoted comments

@wiedem Thanks for solution!

Here is my solution. open the Terminal and type it commands.

Solution

brew install librsvg 
brew unlink pango  
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/7cf3b63be191cb2ce4cd86f4406915128ec97432/Formula/pango.rb
brew switch pango 1.42.4_1 
  • Enjoy it 🎉

I’ve reported this:

And the underlying issue may be connected to the fact that in pango 1.44, they have replaced cairo by harfbuzz for getting glyph extents: https://github.com/harfbuzz/harfbuzz/issues/1892

Solution brew uninstall librsvg brew uninstall pango

The workaround for now is to uninstall librsvg and use default graphicsmagick

@marcosgriselli Happened to me a couple of days ago. I used the built in brew install step of Bitrise and some caching which I disabled and replaced everything related to librsvg with a shell script:

brew install librsvg
brew link librsvg

if [ -d "/usr/local/Cellar/pango/1.42.4_2" ]
then
   brew link pango
else
   brew unlink pango
   brew install --build-from-source https://raw.githubusercontent.com/Homebrew/homebrew-core/a8ac7ea5/Formula/pango.rb
fi

I don’t know if it helps (I think it’s been posted before)

This only works if you had it previously installed (and did not get removed via some kind of cleanup), right?

Yes.

In case you’ve already cleaned up version 1.42.4_1, run the following command first: brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/7cf3b63be191cb2ce4cd86f4406915128ec97432/Formula/pango.rb

@techinpark Thanks for your advice, when trying to run your command (with a removed whitespace between – and dark) inside the folder containing the .png, badge does not find any icons. Anyway, we will probably need to get a solution using the fastfile, since running manual commands is not something we want to do in our automation process, if possible. If we find a solution to this which works for us I will update you.

I came across the issue today and i resolved it with:

brew upgrade librsvg

Thanks @aitor for the effort here

@fruitcoder thanks! You pushed me in the right direction. I was using the script step but left the set -e line which was probably reporting a false error and failed the step with no reason. Removed it and the installation is working again and the badge looks perfect.

@techinpark The ‘alpha’ or ‘beta’ label no more generate.

@julianch have you installed graphicsmagick? brew install graphicsmagick