-
-
Notifications
You must be signed in to change notification settings - Fork 11
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 not correctly computed #110
Comments
Thanks for your quick reponse. I tried 1.2.0 and 1.7.0. Withe single digit numbers it is fine here too, but with 2 digit numbers ie.g. 14 25 18 the numbers are shift to the right. The code looks like
|
Note that you are relying on default values for the used fonts. Those can vary between renderers. To ensure reproducible results you should always specifically set the Would you mind sharing an image about the discrepancies you are encountering? Without it is hard to judge what is going wrong on your end. I am aware of a small issue with the way the anchor is handled but I'm not sure whether this is even the issue here. |
o.k. that helps. I added font-family="Sans,Arial" and the alignment is centered now. Thanks a lot. As I mentioned, I know little more than nothing about svg and not expecting you to answer in lightning speed ;) I tried out svgSalamander which I used before (flatLaf switched from svgSalamander to jsvg so I followed) renders the exact same picture with/without font family. BTW the 2nd picture I added (with 11 25 18) is an example of not centered (the 25 shows it best that left and right border are unequal) |
Glad I could help.
Ok looking at the second picture a bit closer I think this might actually be related to the issue I was thinking off. Let me look into how this can be mitigated. |
I have to admit that I'm a total svg-newbie. For some reasons I want to use a scoreboard like this.
when I use single digit numbers everything is nicely centered, if I use 2 digit numbers it is displaced with jsvg but well aligned with e.g. Xview or FireFox on Linux, see here:
edit: somehow the svg-code isn't displayed so I appended it additionally
The text was updated successfully, but these errors were encountered: