[vte/wip/egmont/bidi: 100/107] etap11



commit e4c0352b617649ff920e8384119c90ac7d1ec2b8
Author: Egmont Koblinger <egmont gmail com>
Date:   Fri May 24 17:59:39 2019 +0200

    etap11

 src/bidi.cc | 20 ++------------------
 1 file changed, 2 insertions(+), 18 deletions(-)
---
diff --git a/src/bidi.cc b/src/bidi.cc
index 34f4d0c5..dfee836b 100644
--- a/src/bidi.cc
+++ b/src/bidi.cc
@@ -569,27 +569,11 @@ bool BidiRunner::implicit_paragraph(vte::grid::row_t start, vte::grid::row_t end
                 return false;
         }
 
-        /* Arabic shaping
-         *
-         * https://www.w3.org/TR/css-text-3/#word-break-shaping says:
-         * "When shaping scripts such as Arabic wrap [...] the characters must still be shaped (their 
joining forms chosen)
-         * as if the word were still whole."
-         *
-         * Also, FriBidi's Arabic shaping methods, as opposed to fribidi_reorder_line(), don't take an 
offset parameter.
-         * This is another weak sign that the desired behavior is to shape the entire paragraph before 
splitting to lines.
-         *
-         * We only perform shaping in implicit mode, for two reasons:
-         *
-         * Following the CSS logic, I think the sensible behavior for a partially visible word (e.g. at the 
margin of a
-         * text editor) is to use the joining/shaping form according to the entire word. Hence in explicit 
mode it must be
-         * the responsibility of the BiDi-aware application and not the terminal emulator to perform 
joining/shaping.
-         *
-         * And a technical limitation: FriBidi can only perform joining/shaping with the logical order as 
input, not with
-         * the visual order. We'd need to find another API, or do ugly workarounds, which I'd rather not. */
+        /* Arabic shaping (on the entire paragraph in a single run). */
         fribidi_join_arabic (fribidi_chartypes, count, fribidi_levels, fribidi_joiningtypes);
         fribidi_shape_arabic (FRIBIDI_FLAGS_ARABIC, fribidi_levels, count, fribidi_joiningtypes, 
fribidi_chars);
-
         g_assert_cmpint (pbase_dir, !=, FRIBIDI_PAR_ON);
+
         /* For convenience, from now on this variable contains the resolved (i.e. possibly autodetected) 
value. */
         rtl = (pbase_dir == FRIBIDI_PAR_RTL || pbase_dir == FRIBIDI_PAR_WRTL);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]