mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Brackets reversion differs in luabidi (LuaTeX) from bidi (XeTeX)
This amends [195f62ac93/lyxgit]
(cherry picked from commit d3aa102260
)
This commit is contained in:
parent
f60f82e7b7
commit
f0f4b98c6e
@ -1920,11 +1920,12 @@ char_type Paragraph::getUChar(BufferParams const & bparams,
|
||||
// Most likely, we should simply rely on Qt's unicode handling here.
|
||||
string const & lang = getFontSettings(bparams, pos).language()->lang();
|
||||
|
||||
// With polyglossia, brackets and stuff need not be reversed in RTL scripts
|
||||
// With polyglossia and XeTeX (bidi), brackets and stuff need not be
|
||||
// reversed in RTL scripts
|
||||
// FIXME: The special casing for Hebrew parens is due to the special
|
||||
// handling on input (for Hebrew in e5f42f67d/lyxgit); see #8251.
|
||||
char_type uc = c;
|
||||
if (rp.use_polyglossia) {
|
||||
if (rp.use_polyglossia && rp.flavor == OutputParams::XETEX) {
|
||||
switch (c) {
|
||||
case '(':
|
||||
if (lang == "hebrew")
|
||||
@ -1937,6 +1938,19 @@ char_type Paragraph::getUChar(BufferParams const & bparams,
|
||||
}
|
||||
return uc;
|
||||
}
|
||||
// LuaTeX (luabidi) is different
|
||||
if (rp.use_polyglossia && rp.flavor != OutputParams::XETEX) {
|
||||
switch (c) {
|
||||
case '(':
|
||||
if (lang != "hebrew")
|
||||
uc = ')';
|
||||
break;
|
||||
case ')':
|
||||
if (lang != "hebrew")
|
||||
uc = '(';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// In the following languages, brackets don't need to be reversed.
|
||||
// Furthermore, in arabic_arabi, they are transformed to Arabic
|
||||
|
@ -74,6 +74,8 @@ What's new
|
||||
|
||||
- Fix paragraph alignment with RTL documents and LuaTeX (part of bug 11399).
|
||||
|
||||
- Fix direction of brackets with RTL documents and LuaTeX (part of bug 11187).
|
||||
|
||||
|
||||
* USER INTERFACE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user