From: Juergen Spitzmueller Date: Sun, 13 Jan 2019 10:25:17 +0000 (+0100) Subject: Amend 7b639d2db212 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=4b67d27568a5885dd8936c905bdc973d77f5a445;p=features.git Amend 7b639d2db212 Not the (ASCII) encoding matters here, but the (TU) font encoding. --- diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 5c8783b324..457222ee37 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -927,9 +927,9 @@ int Paragraph::Private::latexSurrogatePair(BufferParams const & bparams, length -= pos; latex2 = latex2.substr(pos, length); // We only need the script macro with non-native font encodings - // and with ASCII encoding (e.g., XeTeX with TeX fonts) - if (Encodings::needsScriptWrapper(script, fontenc) - && runparams.encoding != encodings.fromLyXName("ascii")) { + // and with XeTeX/LuaTeX (with TeX fonts) + if (!Encodings::needsScriptWrapper(script, fontenc) + && !runparams.isFullUnicode()) { scriptmacro = from_ascii("\\" + script + "{"); cb = from_ascii("}"); } @@ -1023,9 +1023,9 @@ 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 ASCII encoding (e.g., XeTeX with TeX fonts) + // and with XeTeX/LuaTeX (with TeX fonts) if (!Encodings::needsScriptWrapper(script, fontenc) - && runparams.encoding != encodings.fromLyXName("ascii")) { + && !runparams.isFullUnicode()) { // Correct font encoding is being used, so we can avoid \text[greek|cyr]. pos = brace1 + 1; length -= pos;