Open litherum opened 5 years ago
Cc @fantasai
I think I would agree. CC i18n? :) e.g. i18n-alreq (I can't edit this repo's issues)
I'm finding it hard to imagine people doing this at all with a cursive script, unless it's word by word. But if they did, i'm thinking it may be more similar to vertical text as described at https://w3c.github.io/alreq/#h_vertical_upright (though that's apparently very rare too).
That approach would be the opposite to the hyphenation approach (which isn't actually used in Arabic text, but we believe may be used for Uighur), in that it isolates the characters.
I added labels for i18n-alreq and i18n-mlreq to bring this to the attention of the arabic and mongolian folks. Let's see what they say.
SVG already specifically requires that ligatures be preserved even if the component characters are assigned different positions. (The position for the second/subsequent character is ignored.) An author needs to explicitly disable ligatures if they don't want that to happen.
So it is only to be expected that contextual alternates are also preserved, regardless of glyph positioning. The browsers that don't do this are broken.
We cannot assume that an author that gives exact positions to letters is intending to render them in isolated form. In many cases, the positioning attributes are about ”locking in” text shaping from the original design software, not creating abstract designs.
For cursive scripts, the results of this locked-in position may be sometimes sub-optimal, with imperferct overlap of the glyphs. But for the overall design, preserving the exact position of the letters in the graphic, as the author designed it, may be more important than letting the user agent's text-shaping engine do what it thinks is best.
@behnam @shervinafshar @sahafshar do you have any thoughts on this?
Thanks for flagging, @r12a.
We have tried to answer this question on the Joining section of the Requirements doc. (https://w3c.github.io/alreq/#h_joining)
Imho, a good way to always look at joining-related questions is to remember the fact that shapes of letters in Perso-Arabic script do carry semantics with them, and therefore should not be changed without explicit, possibly language-aware, indications.
If I try to translate the question here to other writing systems, the question would become something like this for Latin: would you replace "a" glyph with "A" because the requested hight of the glyph was larger than what you got for "a"?
Yes, ideally there will exist a typesetting framework that, given the text and some x
attributes, would know how to position the letters, in their meant shapes, at the desired coordinates. This almost exists for Latin script, but clearly doesn't exist for Perso-Arabic script, yet. So, changing the text to match the current (limited) technical ability of type setting doesn't really help anyone.
That said, it would still be possible, if needed, to use the x
attribute to position any explicitly shaped character, following use of joining control characters, as described by Unicode.
Hope this is helpful.
The SVG Working Group just discussed Text with multiple x="" values should be shaped as if it was not broken
, and agreed to the following:
RESOLUTION: All characters inside a text element should be shaped as if they are one unit
The SVG Working Group just discussed Text i18n issues
.
Text with multiple x="" values causes the characters to be broken up, within a word, so that parts of the word are in one place and parts are in another place. However, some scripts (like Arabic) require shaping across the entire word in order to be legible.
It's probably impossible to use things like kashidas to make text flow from one arbitrary place to another; however, we can at least require that the word be shaped correctly as if were placed contiguously.
This is conceptually similar to the hyphenation rules in CSS level 3. Those rules state:
and provides this descriptive example:
For example, if the Uyghur word “داميدى” were hyphenated, it would appear as not as .
The longer text in CSS is: