Page MenuHomePhabricator

SVG attribute `dominant-baseline` does not work
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

See File:SVG text dominant baseline.svg
The file uses the SVG attribute dominant-baseline with four values.

What happens?:

All four texts are rendered in the default position, i.e. the text appears above the black line.

What should have happened instead?:

For central, middle and hanging the text should have the respective vertical positioning.
This works in all browsers, but not in Wikimedia projects.

Related Objects

StatusSubtypeAssignedTask
OpenBUG REPORTNone
OpenNone

Event Timeline

Watchduck renamed this task from SVG attribute `dominant-baseline` does to SVG attribute `dominant-baseline` does not work.Jul 9 2026, 7:08 PM

According to https://commons.wikimedia.org/wiki/Librsvg_bugs , librsvg 2.54.7 is used for converting SVG to PNG previews.

On my own computer I found that librsvg 2.54.7 produces a PNG with the problem described above for SVG text dominant baseline.svg .

Fixed upstream in https://gitlab.gnome.org/GNOME/librsvg/-/work_items/414 already.
Fix is included in librsvg 2.59.90 or later.
Cannot reproduce the problem with librsvg 2.62.3 locally via rsvg-convert -w 512 -f png -u -o SVG_text_dominant_baseline.svg.png SVG_text_dominant_baseline.svg