dominant-baseline property not respected for SVG files
The following SVG file has the dominant-baseline
property set to hanging
and middle
, but both seem to be ignored in Loupe, but respected in browser viewers (Firefox, Brave).
Expected (screenshot from Firefox) | Observed on Loupe |
---|---|
- Version: 45.3
- App ID: org.gnome.Loupe
- Sandboxed: true flatpak
OS Information
PRETTY_NAME="Ubuntu 23.10"
NAME="Ubuntu"
VERSION_ID="23.10"
VERSION="23.10 (Mantic Minotaur)"
VERSION_CODENAME=mantic
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=mantic
LOGO=ubuntu-logo
A minimal example:
<svg height="500px" preserve-aspect-ratio="xMinYMin" version="1.1" viewBox="67 28 225 110"
width="1000px" xmlns="http://www.w3.org/2000/svg">
<style type="text/css">
#legend text {
text-anchor: start;
dominant-baseline: middle;
font-size: 3px;
font-weight: normal;
}
#legend rect {
stroke: black;
fill: white;
stroke-width: .2;
}
#legend text#legend-title {
text-anchor: start;
dominant-baseline: hanging;
font-size: 4px;
font-weight: bold;
}
</style>
<defs>
<g id="legend">
<rect x="0" y="0" width="50" height="30" rx="2" />
<text id="legend-title" x="3" y="2">Transitions</text>
<g>
<circle cx="4" cy="10" r="1.1" fill="#195fb4" />
<text x="6" y="10">Text1</text>
</g>
<g>
<circle cx="4" cy="15" r="1.1" fill="#3e4d90" />
<text x="6" y="15">Text2</text>
</g>
<g>
<circle cx="4" cy="20" r="1.1" fill="#6b3864" />
<text x="6" y="20">Text3</text>
</g>
<g>
<circle cx="4" cy="25" r="1.1" fill="#9d2033" />
<text x="6" y="25">Text4</text>
</g>
</g>
</defs>
<use href="#legend" x="235" y="100" />
</svg>