Page MenuHomePhabricator

Discrepancies in SVG Translate's pngs and Commons' versions in character and word spacings
Open, Stalled, LowPublic

Description

Seemingly SVG Translate's PNGs differ from Commons' version slightly. Here's an example:
Commons versus SVG Translate

Note the differences in character and word spacings along the X axis and the legend.

What's causing this and can we fix it?

SVG TranslateCommons
750px-2014_West_Africa_Ebola_Epidemic_-_New_Cases_per_Week.svg - from svgtranslate.png (500×750 px, 73 KB)
750px-2014_West_Africa_Ebola_Epidemic_-_New_Cases_per_Week.svg.png (500×750 px, 70 KB)

Related Objects

Event Timeline

Niharika triaged this task as Medium priority.Jan 8 2019, 2:46 AM
Niharika created this task.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

@Samwilson Flagging this for you. I didn't find any other example with substantive differences in my brief search but there will probably be some more. Can we figure out what's causing the differences?

Aklapper renamed this task from Discrepancies in SVG Translate's pngs and Commons' versions to Discrepancies in SVG Translate's pngs and Commons' versions in character and word spacings.Jan 8 2019, 4:46 AM

It gets worse than just font problems! I've just found one where our rendering makes the Malleus label in Anatomy_of_the_Human_Ear_en.svg head out on a weird angle:

5574058166d32766b247a4ab0d192c6a.png (520×675 px, 191 KB)

This is only with custom transations, not with unmodified images, so seems likely to be due to our SVG manipulating and not with rsvg.

Actually, sorry, this is probably a completely separate bug! :) But I'll investigate further before opening another ticket.

@Samwilson That does seem unrelated. It is interesting because we largely don't intentionally mess with coordinates or any kind of positioning.

Here's a screenshot of what I see on the two sites:

SVG TranslateCommons
image.png (796×1 px, 295 KB)
image.png (928×1 px, 221 KB)

Notice the legend and X-axis character and word spacing differences.

Niharika changed the task status from Open to Stalled.Jan 10 2019, 2:29 AM
Niharika removed a project: Community-Tech.

It seems like Sam and I don't see the same image on Commons and hence the differences. Let's ignore this ticket until we see more substantive differences.

The font difference is due to packages: for production to render the SVGs, it has tons of additional fonts installed, unlike our container.

The font difference is due to packages: for production to render the SVGs, it has tons of additional fonts installed, unlike our container.

Can we install those on our container as well? They might especially be useful for non-latin languages.

I'm still not sure why Niharika and I are seeing different things on the file page on Commons. Can anyone else confirm that when they look at this, the kerning of the word 'Total' in the chart legend is incorrect? This is what I see:

Screenshot_2019-01-10 File 2014 West Africa Ebola Epidemic - New Cases per Week svg - Wikimedia Commons.png (412×431 px, 29 KB)

It is incorrect for me. I see it the same as yours.

Screen Shot 2019-01-10 at 2.18.21 PM.png (301×407 px, 27 KB)

Niharika lowered the priority of this task from Medium to Low.Jan 23 2019, 1:48 AM

Here's a screenshot of what I see on the two sites:

SVG Translate (1292px)Commons (1524px)
image.png (796×1 px, 295 KB)
image.png (928×1 px, 221 KB)

Notice the legend and X-axis character and word spacing differences.

Comparing different resolutions of svgs containing T36947 (i.e. font-sizes below 25px) is like comparing apples with cars.

T36947 is

  • librsvg-version-dependent (affects all librsvg-versions from 2012 to April 2021)
  • OS-dependent
  • resolution-dependent (how much you scale)
  • font-size-dependent
  • font-family-dependent

So this is a librsvg-issue. (librsvg released a fix two weeks ago, however WMF is using a outdated librsvg-version which is unmaintained&depreciated since 2017.)