Re: Caret

From: Philippe Verdy <verdy_p_at_wanadoo.fr>
Date: Mon, 12 Nov 2012 21:35:03 +0100

I understand then. You have a single logical position (in encoded plain
text), that maps to two visual positions which may be considered AFTER
depending on the direction properties of the character that you *may* type.

A single vertical line assumes however that you'll type a character which
will use the SAME direction as the character BEFORE the insertion point.

This case remains very infrequent: it is extremely rare to start typing
text in the middle between RTL and LTR text. Usually typing occurs at end
of a paragraph, and most paragraphs use a single direction and when you
have to insert new text in the middle of a paragraph, this is extremely
rarely between a visual-LTR sequence and a viual RTL sequence (I think the
most frequent case will occur between digits and letters/symbols, in cases
like currency amounts or measurements).

When the caret is between a character with a strong direction and a
character with a weak direction (such as SPACE), the caret should adopt the
direction given by the character on the correct side which has a string
direction: this is the MOST frequent case by far where changes of
directions are likely to occur and where people will start typing
something: here again you don't need the two parts caret.

The two parts caret will then be needed when the insertion point is only in
cases like between letters and digits. Let's take an example in Arabic:

  * If the text encoded in logical order as "ARABIC1234", and displayed as
"CIBARA1234", where the insertion point is between "C" and "1":
    ^CIBARA_1244
    where "^" and "_" are the two carets.

* If the encoded text is "ARABIC 1234" and the insertion point is between
"C" and SPACE, the caret should be position AFTER the visual-RTL letter C,
i.e. on its left :
    |CIBARA 1244
  where a single "|' caret (possibly showing an arrowhead orientation to
the right) is enough (we ignore the weak direction of the lollowing SPACE).

  * If the encoded text is "ARABIC 1234" and the insertion point is between
SPACE and "1", the caret should be position BEFORE the visual-LTR digit 1
(even if this digit is an RTL Arabic digit), i.e. on its left :
    CIBARA |1244
  where a single "|' caret (possibly showing an arrowhead orientation to
the right if this is an Eastern Arabic digit, or to the left if it's a
Arabic-European digit or Indic digit) is also enough (we also ignore the
weak direction of the previous SPACE)..

-- Philippe.
Received on Mon Nov 12 2012 - 14:38:21 CST

This archive was generated by hypermail 2.2.0 : Mon Nov 12 2012 - 14:38:22 CST