diff --git a/00README_STR_METRICS_BRANCH b/00README_STR_METRICS_BRANCH index 342d2f6583..0416ed48dd 100644 --- a/00README_STR_METRICS_BRANCH +++ b/00README_STR_METRICS_BRANCH @@ -47,3 +47,5 @@ What is done: rely on Qt to do handle complex scripts. * Get rid of LyXRC::rtl_support, which does not have a real use case. + +* Fix display of [] and {} delimiters in Arabic scripts. diff --git a/src/rowpainter.cpp b/src/rowpainter.cpp index 8c8ac4c25f..5bd3209439 100644 --- a/src/rowpainter.cpp +++ b/src/rowpainter.cpp @@ -166,24 +166,9 @@ void RowPainter::paintChars(pos_type & vpos, Font const & font) pos_type pos = bidi_.vis2log(vpos); pos_type start_pos = pos; // first character - char_type c = par_.getChar(pos); docstring str; str.reserve(100); - - // special case for arabic - string const & lang = font.language()->lang(); - bool const swap_paren = lang == "arabic_arabtex" - || lang == "arabic_arabi" - || lang == "farsi"; - - // FIXME: Why only round brackets and why the difference to - // Hebrew? See also Paragraph::getUChar - if (swap_paren) { - if (c == '(') - c = ')'; - else if (c == ')') - c = '('; - } + char_type const c = par_.getChar(pos); str.push_back(c); FontSpan const font_span = par_.fontSpan(pos); @@ -212,7 +197,7 @@ void RowPainter::paintChars(pos_type & vpos, Font const & font) // Track change type or author has changed. break; - char_type c = par_.getChar(pos); + char_type const c = par_.getChar(pos); if (c == '\t') break; @@ -220,15 +205,6 @@ void RowPainter::paintChars(pos_type & vpos, Font const & font) if (!isPrintableNonspace(c)) break; - // FIXME: Why only round brackets and why the difference to - // Hebrew? See also Paragraph::getUChar - if (swap_paren) { - if (c == '(') - c = ')'; - else if (c == ')') - c = '('; - } - str.push_back(c); }