-
Notifications
You must be signed in to change notification settings - Fork 132
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
Confused about 'writing-mode' with 'direction' #618
Comments
Thanks for the nicely illustrated and documented issue! SVG 2 defers to CSS Writing Modes 3, so please re-raise the issue over there |
This is an issue with how SVG defines the x and y attributes, not with how writing-mode works. Please re-open and resolve this in SVG2, there is nothing we can do to help in the CSS specs: the text is very obviously rendered in the correct manner and the only question is its placement in the coordinate space. |
Thanks for the clarification, @fantasai |
The relevant spec section is indeed too brief and does not clearly state the impact of the
|
I believe that would result in Chrome's rendering in the screenshots above. Unsure about the exact x position since I can't see the font metrics... should be halfway between the ideo and idtp baselines. |
The SVG Working Group just discussed The full IRC log of that discussion<AmeliaBR> Topic: 'writing-mode' with 'direction'<AmeliaBR> github: https://github.com//issues/618 <chris> https://github.com//issues/629 <AmeliaBR> Chris: I'd initially thought this was a CSS issue, but fantasai threw it back to us, because this really comes down to x and y and text-anchor. <AmeliaBR> Amelia: So the question is, if you have writing mode tb and direction rtl is start "top" or "bottom"? <AmeliaBR> Chris: Yes, and as fantasai suggested there may be complications with issue 629 <AmeliaBR> Amelia: I'm not sure they are really dependent on each other. It's about alignment in the orthogonal direction. <AmeliaBR> ... much of these may both be caused by SVG 1.1 spec text that needs to change to match changed property definitions in `writing-mode` and `dominant-baseline`. <AmeliaBR> ... probably again, we need to take a test-first approach and see if the spec actually defines behavior. <AmeliaBR> Dirk: But do we have agreement on what should happen? <AmeliaBR> Amelia: Maybe come back with tests for all the combinations, but no references & then we can go through and discuss what should happen. |
Conclusion from WG discussion was that we need tests to be able to discuss the issue and see what existing implementations do. So we need tests. Then discussion, and a resolution of #629 |
https://www.w3.org/TR/SVG/text.html#WritingModeProperty
https://www.w3.org/TR/SVG/text.html#DirectionProperty
Afaiu,
writing-mode
was completely changed in SVG 2, but I think that the problem should persist. I'm not sure if there are any SVG 2 ready applications, so I cannot test this. That's why the example below is SVG 1.1 based.As you can see, the results are pretty different. Which one is the correct one and why?
PS: is the SVG 1.1, the
writing-mode
property could have 6 different values. But according to the SVG 2 spec, there are actually only two of them: left-to-right and top-to-bottom. So in the SVG 1.1 I can treatlr-tb
,rl
andrl-tb
aslr
andtb-rl
astb
and it should not technically affect anything?The text was updated successfully, but these errors were encountered: