[alreq] Joining Context cases and examples

behnam has just created a new issue for https://github.com/w3c/alreq:

== Joining Context cases and examples ==
Looking at discussions around joining issues, it looks like we better provide more content on Joining Context (as noted here in short: https://w3c.github.io/alreq/#h_context_based_joining) and collect cases and examples of the need for more explicit control on it by users.

See also my comment here: https://github.com/w3c/csswg-drafts/issues/698#issuecomment-297472304

Some cases where explicit joining context management can be helpful:

## Highlighting letters in a word

>From first-grade Persian Reading book:
<img width="173" alt="screen shot 2017-04-26 at 12 00 00 pm" src="https://cloud.githubusercontent.com/assets/37169/25446686/e5db0aa4-2a77-11e7-8829-3d804ec7af29.png">

Note: the style difference in this example is just `color`, but it's very common to set underline, which in Arabic script is usually better done with `border-bottom` and not `underline`. (Yeah, another issue by itself, but the `border-bottom` solution is a common-practice, at least.)

## Blanking letters in a word

<img width="721" alt="screen shot 2017-04-26 at 12 06 17 pm" src="https://cloud.githubusercontent.com/assets/37169/25446925/c72c6408-2a78-11e7-8ed1-559164d63c8d.png">

Note: When the shape of letters is fixed in the content, then this is expected to be done by the user using joining control characters (ZWNJ/ZWJ), but, when this is part of the presentation/application logic, it should be done via joining context.

For example: let's say you want to create a game for children that blanks some letters and ask user to fill in by selecting the correct answer from a list. When there's no explicit joining context management, every single application need to put some joining logic in the code to fix the shape of the letters surrounding the missing letter, just to get it right for cursive scripts. (Note that you cannot just add ZWJ, but need to first see on which sides the missing letter actually joins, and only add ZWJ there, meaning that you need a full copy of the `ArabicShaping.txt` data and algorithm to handle it!)

## Drop caps

Here's an example of a drop caps being applied without proper *joining context* for either the first letter or the rest of the word:

![image](https://cloud.githubusercontent.com/assets/37169/25446075/f93acc9e-2a75-11e7-862b-b4e02d36741c.png)

See also discussion here: https://groups.google.com/forum/#!topic/persian-computing/W-Upl6DAEcg

## Non-inline

Sometimes joining context even stretches over block elements, like in Arabic poetry (and possibly other languages, too) when a word is cut intra-joining-segment between verses, like the first and third cases in the following examples (the second case being a inter-joining-segment cut):

![image](https://cloud.githubusercontent.com/assets/37169/25447418/bee9e886-2a7a-11e7-9a24-6511f9f64e9e.png)

Please view or discuss this issue at https://github.com/w3c/alreq/issues/112 using your GitHub account

Received on Wednesday, 26 April 2017 17:34:25 UTC