2011/9/15 Kent Karlsson <kent.karlsson14_at_telia.com>:
> Back to the original issue of this thread: All the workarounds w.r.t. LDM
> depend on the directionality of neighbouring characters, not directly on
> the embedding level direction.
If so, you can mark the slash in "12/31" with LDM, it will not solve
any ambiguity. The only safe way is to use embedded levels.
I's like to add a remark: we can embed strong LTR or strong RTL
sequences (with LRE/RLE...PDF), but there's currently no way to embed
sequences that should start by characters with weak direction (in fact
all characters except letters: the RLE or LRE start is too strong, we
would also need a WDE control, for Weak Direction Embedding, where the
start of the internal substring would have its content adopt the
direction of the first string character in it, and if not found, would
then inherit the direction of the outer text, recursively).
And I have another problem with the Bidi algorithm: it does not work
correctly with interlinear annotations (for exactly the same reason:
the text between IAS and IAT should be embedded internally with a weak
direction, and the direction of the text after IAT should not depend
at all of the text between IAS and IAT, but only on the text between
IAA and IAS, or before the annotation anchor (so IAA can be ignored by
the Bidi algorithm, IAT should behave like PDF, but which of the LRE
or RLE class should IAS use? IAS would also need the same class as the
missing WDE described in the previous paragraph!
The only very poor way to create a sort of WDE would be to encode RLE
or LRE immediately followed by a paragraph separator (CR, LF, NL, PS)
whose vertical advanced should be canceled in the rendering, because
paragraphs always start with a weak direction for Bidi processing.
So to handle interlinear annotations, you would insert two Bidi
classes for this character, instead of just one:
- map IAA to the N class
- map IAS to the LRE or RLE class, imediately followed by the B class
- map IAT to the PDF class
And I'd like to propose that the WDE sequence be encoded as <LRE,NL>,
and with the intent that the NL (or CR or LF, or CR+LF or PS) would
not be rendered with its implied vertical advance in the context of a
previous LRE or RLE.
Both proposals do not require changes in existing Bidi classes, but
still changes in the UBA to handle these special (forgotten)
sequences:
* WDE ::= (RLE | LRE) (LF | CR LF? | NL | PS) ; // Bidi class =
(RLE|LRE), B // (to be used with PDF)
* IAA ; // Bidi class = N
* IAS ; // Bidi class = LRE,B
* IAT ; // Bidi class = PDF
Philippe.
Received on Wed Sep 14 2011 - 20:50:13 CDT
This archive was generated by hypermail 2.2.0 : Wed Sep 14 2011 - 20:50:14 CDT