Subject: bug#51517: GNU ELPA - SVG badge broken

From: Daniel Mendler <[email-masked]>
Date: Sun, 31 Oct 2021 23:09:19 +0100

Hi Stefan!

> Lars Ingebrigtsen [2021-10-31 16:30:04] wrote:
>> tsuucat <[email-masked]> writes:
>>> The badge from https://elpa.gnu.org/packages/vertico.html is not broken.
>>> (vertico 0.14, updated 2021-Aug-11)
>>> The badge from https://elpa.gnu.org/packages/consult.html is broken.
>>> (consult 0.12, updated 2021-Oct-11)
>>> I read the broken badge (https://elpa.gnu.org/packages/consult.svg) and 
>>> elpa-admin.el. I suspect `elpaa--string-width` returns 0.
>> Perhaps Stefan has some insight here; added to the CCs.
> 
> I haven't had a chance to look at it yet, but this code is from Daniel,
> so maybe he has an idea of what's going on?

The code uses imagemagick "convert" to determine the width in pixels,
which is font dependent. So I assume something broke on the system -
update of the system package, or maybe imagemagick or the font was
removed. This part of the code is not exactly robust unfortunately - if
I recall correctly, you even had to install a few missing packages to
get this to work after I implemented the badges.

Daniel