linebender / linebender/resvg

Text positioning regression in 0.36 compared to 0.27

Open
#671 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
4.1k
Forks
348
Avg merge
1d 14h
Merged PRs (30d)
3

Description

I was running version 0.27 of `resvg-explorer-extension.exe` for a long time and came around to update recently and noticed a regression between 0.27 and 0.36 in regard to the text handling/positioning.

As i am also using `usvg` in a project of mine to parse SVG files and then render them, i went ahead and also updated my project from 0.27 to 0.36 and noticed the same regression there.

Here you can find an example:

### usvg 0.27 (correct text placement)
Rendered in my project:
![grafik](https://github.com/RazrFalcon/resvg/assets/11967542/d22ddee3-eddb-4e94-add5-ed969fd6602d)

### usvg 0.36 (wrong text placement)
Rendered in my project:
![grafik](https://github.com/RazrFalcon/resvg/assets/11967542/18622545-ecc3-46c8-9d95-b44f043d8f64)

Thumbnail rendered in explorer:
![grafik](https://github.com/RazrFalcon/resvg/assets/11967542/36a9d5a7-665a-43ab-b58a-4ca061709135)
If you look closely where the arrow points to, you can see, some cut of text pieces there.

I'll also attach the file in question for debugging reasons:
[twinkle.zip](https://github.com/RazrFalcon/resvg/files/13061007/twinkle.zip)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached twinkle.zip and compare its text rendering between usvg 0.27 and 0.36, using the provided screenshots as the expected-versus-regressed behavior. The issue names no source file or test; done means the affected text is positioned and rendered without the reported clipped pieces in both the project output and explorer thumbnail.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.