Environment
interrogate version(s): 1.7.0
- Operating System(s): Ubuntu 24.04
- Python version(s): 3.10.14
Description of the bug
When generating a badge on Linux, text is broken.
What you expected to happen
Text should be not broken.
How to reproduce (as minimally and precisely as possible)
Run interrogate with PNG badge generation on Linux.
Anything else we need to know?
It's a Cairo bug that hasn't been fixed for 8 years and maybe it will have never been fixed, see
https://gitlab.freedesktop.org/cairo/cairo/-/issues/152
Kozea/CairoSVG#434
The simple workaround has been suggested in Kozea/CairoSVG#434 , which was working for me: deleting text-rendering="geometricPrecision" substring from SVG before converting it to PNG helps to fix CairoSVG.
I propose to automate this workaround here. When generating PNG badge, the following steps can be conducted:
- Generate SVG badge
- Delete the
text-rendering="geometricPrecision" substring from the generated SVG
- Convert SVG to PNG
Environment
interrogateversion(s): 1.7.0Description of the bug
When generating a badge on Linux, text is broken.
What you expected to happen
Text should be not broken.
How to reproduce (as minimally and precisely as possible)
Run interrogate with PNG badge generation on Linux.
Anything else we need to know?
It's a Cairo bug that hasn't been fixed for 8 years and maybe it will have never been fixed, see
https://gitlab.freedesktop.org/cairo/cairo/-/issues/152
Kozea/CairoSVG#434
The simple workaround has been suggested in Kozea/CairoSVG#434 , which was working for me: deleting
text-rendering="geometricPrecision"substring from SVG before converting it to PNG helps to fix CairoSVG.I propose to automate this workaround here. When generating PNG badge, the following steps can be conducted:
text-rendering="geometricPrecision"substring from the generated SVG