Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested tspan positioning is weird #864

Open
si14 opened this issue Dec 17, 2024 · 2 comments
Open

Nested tspan positioning is weird #864

si14 opened this issue Dec 17, 2024 · 2 comments
Labels

Comments

@si14
Copy link

si14 commented Dec 17, 2024

SVG:

<svg xmlns="http://www.w3.org/2000/svg" width="1500" height="600" viewBox="0 0 1500 600">
    <text x="50" y="550" text-anchor="start" dominant-baseline="text-after-edge"
          font-family="Nunito" fill="white"
          style="filter:drop-shadow(0 3px 7px black)">
        <tspan x="50" dy="-190" font-size="120px" font-weight="800">Every Time ✅</tspan>
        <tspan x="50" dy="113" font-size="66px" font-weight="800">
            <tspan>hello</tspan>
            world
        </tspan>
    </text>
</svg>

Render (notice how "hello" got shifted):

Screenshot 2024-12-17 at 21 28 08

My understanding is that it should be still in line.

@LaurenzV
Copy link
Contributor

Hm yeah, seems like a bug.

@LaurenzV LaurenzV added the bug label Dec 18, 2024
@RazrFalcon
Copy link
Collaborator

Looks like a dominant-baseline bug, but this is a super undocumented feature, so who knows how it should work exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants