[LyX/master] don't mirror delimiters in unicode engines
Udi Fogiel <[email protected]> Mon, 06 Jul 2026 00:26:58 +0000
| Newsgroups | gmane.editors.lyx.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 17e28ce9f9934d82014e9b9cc6d0816c6c30dd4f Author: Udi Fogiel <[email protected]> Date: Sun Jul 5 20:58:48 2026 +0300 don't mirror delimiters in unicode engines mirroring is applied at the font level with correct setup. This is not something that LyX can track or should bother with. For example luaotfload applies mirroring if HarfBuzz is used, so LyX should not mirror in this case, but it currently does. --- src/Paragraph.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 4ea7bbd633..044bdb3ea5 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -2081,11 +2081,9 @@ char_type Paragraph::getUChar(BufferParams const & bparams, // Return unchanged character // 1. in all LTR languages - // 2. if we use XeTeX (both with babel and polyglossia) - // 3. if we use LuaTeX with babel + // 2. in unicode engines (XeTeX, LuaTeX) if (!getFontSettings(bparams, pos).isRightToLeft() - || rp.flavor == Flavor::XeTeX - || (rp.use_babel && rp.flavor == Flavor::LuaTeX)) + || rp.isFullUnicode()) return c; // For the remaining cases, we need to account for some special cases. @@ -2108,16 +2106,12 @@ char_type Paragraph::getUChar(BufferParams const & bparams, char_type uc = c; // These are the cases where we need to mirror delimiters in RTL context - // in the remaining cases (polyglossia + LuaTeX or classic [pdf]latex): - // 1. With polyglossia and LuaTeX (luabidi) parentheses and brackets - // need to be mirrored in RTL, regardless of the language, or script. - // 2. In the languages that follow, parentheses need to be mirrored - // in classic (pdf)latex - bool const reverseparens = (rp.use_polyglossia || lang == "hebrew"); - // 3. In all RTL languages except for those that follow, brackets - // need to be mirrored in classic (pdf)latex - bool const reversebrackets = rp.use_polyglossia - || (lang != "arabic_arabtex" + // in classic (pdf)latex: + // 1. In the languages that follow, parentheses need to be mirrored + bool const reverseparens = (lang == "hebrew"); + // 2. In all RTL languages except for those that follow, brackets + // need to be mirrored + bool const reversebrackets = (lang != "arabic_arabtex" && lang != "arabic_arabi" && lang != "farsi"); -- lyx-cvs mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-cvs