Page MenuHomePhabricator

Text in PNG thumbnails of SVG files slightly wider than before
Closed, ResolvedPublicBUG REPORT

Description

Hi. As of a couple of days ago, almost every new svg upload (or, at least reapload), creates a weird result, fontwise. The font family is different from expected, much wider, so text all the time appears on the other text, despite the fact there should be enough space between them. There is no problem in [[media:]] file.

  • Take an svg file with a lot of text and different fonts.
  • Edit and reupload.
  • Click on the thumbnail to be sure there is a new proper version.
  • Compare the old and new versions using on some wiki pages.

Expected: The new page should look almost as the old one.
Got: Almost for sure, there is a big mess in the text.

You can compare File:Moscow_metro_map_ru_sb_future_draft.svg and File:Moscow_metro_map_ru_sb_future.svg.
Also, you can check the uploads history of the first one. For example, versions 20230430113930 and 20230501123252. The difference is in one character, I've added "1" to some text label, and the thumbnail fixed.
Here you can see these versions, with one difference marked.

Screenshot_20230501_161038_Samsung Internet.png (749×1 px, 1 MB)

Event Timeline

That's very very likely related to the new thumbor being deployed. And likely caused by fonts not being installed in the containers. cc. @hnowlan @kamila and @VirginiaPoundstone

Aklapper renamed this task from The SVG thumbnail creator is broken in the fonts creation to Text in PNG thumbnails of SVG files slightly wider than before.May 2 2023, 9:07 AM

Not a duplicate of T335271, but possibly fixed by the same patch (https://gerrit.wikimedia.org/r/c/operations/software/thumbor-plugins/+/912258)? Can you try generating a new thumbnail (by requesting a different size so you don't get a cached result) and see this it is still happening?

Change 914285 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/software/thumbor-plugins@master] Add all fonts from mediawiki::packages::fonts

https://gerrit.wikimedia.org/r/914285

Not a duplicate of T335271, but possibly fixed by the same patch (https://gerrit.wikimedia.org/r/c/operations/software/thumbor-plugins/+/912258)? Can you try generating a new thumbnail (by requesting a different size so you don't get a cached result) and see this it is still happening?

Well, it doesn't.

When adding further missing fonts (which I suspect the noto fonts package is subbing in for the lack of), I render the following which looks a bit more correct. Can you please confirm @IKhitron?

output1923.png (2×1 px, 1 MB)

Indeed. This image you brought is the last version, according to OSI colors, and the text looks fine.

Change 914285 merged by jenkins-bot:

[operations/software/thumbor-plugins@master] Add all fonts from mediawiki::packages::fonts

https://gerrit.wikimedia.org/r/914285

Change 914346 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/deployment-charts@master] thumbor: bump image version

https://gerrit.wikimedia.org/r/914346

Change 914346 merged by jenkins-bot:

[operations/deployment-charts@master] thumbor: bump image version

https://gerrit.wikimedia.org/r/914346

A new version of the service has been deployed with a more complete and correct font list. The affected thumbs have been purged. Thanks for the report!

Great, thanks! Confirming it's ok now.

hnowlan claimed this task.

Change 914737 had a related patch set uploaded (by Hnowlan; author: Hnowlan):

[operations/deployment-charts@master] admin_ng: increase thumbor resource limits, eqiad replicas

https://gerrit.wikimedia.org/r/914737