From 4c2b56aa7222db3ca43b295c47dd355dd8582bb9 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Thu, 11 Jul 2019 08:25:18 +0200 Subject: [PATCH] Brackets reversion differs in luabidi (LuaTeX) from bidi (XeTeX) This amends [195f62ac93/lyxgit] --- src/Paragraph.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 0b1bd7048b..5c2570431d 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1860,8 +1860,9 @@ char_type Paragraph::getUChar(BufferParams const & bparams, char_type c = d->text_[pos]; // Return unchanged character in LTR languages - // or if we use poylglossia/bidi. - if (rp.use_polyglossia || !getFontSettings(bparams, pos).isRightToLeft()) + // or if we use poylglossia/bidi (XeTeX). + if ((rp.use_polyglossia && rp.flavor == OutputParams::XETEX) + || !getFontSettings(bparams, pos).isRightToLeft()) return c; // Without polyglossia/bidi, we need to account for some special cases. @@ -1880,7 +1881,8 @@ char_type Paragraph::getUChar(BufferParams const & bparams, char_type uc = c; // 1. In the following languages, parentheses need to be reversed. - bool const reverseparens = lang == "hebrew"; + // Also with polyglodia/luabidi + bool const reverseparens = (lang == "hebrew" || rp.use_polyglossia); // 2. In the following languages, brackets don't need to be reversed. bool const reversebrackets = lang != "arabic_arabtex" -- 2.39.5