-
Notifications
You must be signed in to change notification settings - Fork 133
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' and Arabic text #628
Comments
Same example in copepen: https://codepen.io/krit/pen/BvvbRM |
As the spec is written, the start/end anchoring should only be affected by the So, Firefox & librsvg would be the correct rendering (although the centering is a bit messed up in Firefox by whitespace getting tacked on to one end of each span). There may be two things going on in @RazrFalcon's example:
I'd need to do a little exploring to figure out which is happening. Maybe a mix of both and just general bugginess. Either way, some spec clarifications and lots of tests are probably required. PS, another demo, without the tspans but with a bit of bidirectionality confusion: |
Blink (Chrome) is know to have some issues with "multiple chunk BiDi/RTL", which I suspect is what being triggered here in the original TC. |
The SVG Working Group just discussed
The full IRC log of that discussion<AmeliaBR> Topic: Text-anchor & RTL text<AmeliaBR> github: https://github.com//issues/628 <AmeliaBR> Dirk: Amelia, could you update? <AmeliaBR> Amelia: So, clearly an interop problem. I think its mostly browser bugs, but probably could use some spec clarifications. <AmeliaBR> Dirk: Are changes necessary for SVG 2.0 <AmeliaBR> Tav: needs better tests <AmeliaBR> Amelia: Yes, either way tests are needed. <AmeliaBR> Tav: for Inkscape, it looks like we're ignoring text-anchor on tspan. which is our bug. <AmeliaBR> Dirk: Is there one rendering that is correct? <AmeliaBR> Amelia: Looks like librsvg. But there are differences about glyph selection as well as alignment, not sure which version is correct. <AmeliaBR> Dirk: Ok, so we need tests. Do we also need to change the spec. <AmeliaBR> Amelia: That might be easier to decide as we write the tests. Need to make sure that every test is clearly supported by spec text. <AmeliaBR> Dirk: Can we resolve then to revisit after testing? <AmeliaBR> Amelia: To confirm, that means we are sticking with the main idea of the spec, that text-anchor is only based on explicitly declared `direction`, not on directionality of text characters? <AmeliaBR> Tav: Yes, I don't think we want to change that now. <AmeliaBR> RESOLUTION: No major changes. Re-examine the spec text for clarifications after creating tests. |
Tests at web-platform-tests/wpt#15118 |
I don't think the libsvg rendering is completely correct, as the final glyph (U+062D, ح) on the top line isn't being shaped into a medial form - you can see that it is in Firefox (EDIT: note the "U+0645 م" on the next line should also be medial - but the examples above use Times New Roman, and I think the lack of medial shaping is particular to that font) Shaping should really be applied across Shaping is applied across inline-element boundaries in CSS. The SVG2 spec says that |
https://svgwg.org/svg2-draft/text.html#TextAnchoringProperties
Results:
As you can see, literally everyone is rendering it differently and I'm not sure which one is correct. I think the documentation needs some clarification. It mentions the
direction
property. But that's it.The text was updated successfully, but these errors were encountered: