commit 68b6198d635e2448c89c3f85caf146fd72951f8c
Author: Günter Milde <[email protected]>
Date: Sat Mar 2 20:24:05 2019 +0100
Fix/simplify "if" clause for application of \textcyrrillic or \textgreek.
Also with Xe/LuaTeX only required with non-native font encodings.
---
src/Paragraph.cpp | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index 0ad14ce..27aecb5 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -924,8 +924,7 @@ int Paragraph::Private::latexSurrogatePair(BufferParams
const & bparams,
length -= pos;
latex2 = latex2.substr(pos, length);
// and place it before the accent macro if required (#6463)
- if (Encodings::needsScriptWrapper(script, fontenc)
- || runparams.isFullUnicode()) {
+ if (Encodings::needsScriptWrapper(script, fontenc)) {
scriptmacro = from_ascii("\\" + script + "{");
cb = from_ascii("}");
}
@@ -1010,10 +1009,8 @@ int Paragraph::Private::writeScriptChars(BufferParams
const & bparams,
int length = brace2;
bool closing_brace = true;
// We only need the script macro with non-native font encodings
- // and with XeTeX/LuaTeX (with TeX fonts)
- if (!Encodings::needsScriptWrapper(script, fontenc)
- && !runparams.isFullUnicode()) {
- // Correct font encoding is being used, so we can avoid
\text[greek|cyr].
+ if (!Encodings::needsScriptWrapper(script, fontenc)) {
+ // Correct font encoding is being used, so we can avoid
\text(greek|cyrrillic).
pos = brace1 + 1;
length -= pos;
closing_brace = false;