Skip to content
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

Broken text on the generated PNG badge on Linux #184

Open
itymchyshyn-sc opened this issue Dec 10, 2024 · 0 comments
Open

Broken text on the generated PNG badge on Linux #184

itymchyshyn-sc opened this issue Dec 10, 2024 · 0 comments
Assignees
Labels
bug Something isn't working needs triage Issue needs triaging

Comments

@itymchyshyn-sc
Copy link

itymchyshyn-sc commented Dec 10, 2024

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:

  1. Generate SVG badge
  2. Delete the text-rendering="geometricPrecision" substring from the generated SVG
  3. Convert SVG to PNG
@itymchyshyn-sc itymchyshyn-sc added bug Something isn't working needs triage Issue needs triaging labels Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Issue needs triaging
Projects
None yet
Development

No branches or pull requests

2 participants