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

text-anchor of first tspan anchors all tspans #2353

Closed
michaellisitsa opened this issue Jan 20, 2025 · 1 comment
Closed

text-anchor of first tspan anchors all tspans #2353

michaellisitsa opened this issue Jan 20, 2025 · 1 comment
Labels
bug Existing features not working as expected
Milestone

Comments

@michaellisitsa
Copy link

Appears the text-anchor of the first tspan is anchoring all tspans.
e.g. Both tspans are start anchored. Middle is ignored

 <text x="10" y="30" class="small">
    <tspan x="0" dx="0" dy="0" text-anchor="start" >Start</tspan>
    <tspan x="0" dx="0" dy="15" text-anchor="middle">Middle</tspan>
  </text>

I'd previously PR'ed #2043 in v61.0 but this didn't appear to resolve the below case.

Repro:
https://replit.com/@michaellisitsa/Python-Weasyprint-tspan-v63#tspan.py

Image
@liZe liZe closed this as completed in 513397e Jan 20, 2025
@liZe liZe added the bug Existing features not working as expected label Jan 20, 2025
@liZe liZe added this to the 64.0 milestone Jan 20, 2025
@liZe
Copy link
Member

liZe commented Jan 20, 2025

Thanks a lot for the report and the sample, that was really helpful.

There was quite a dirty workaround for this case, the value of the first child was always used. It should now be fixed, feedback is welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants