From 4b67d27568a5885dd8936c905bdc973d77f5a445 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sun, 13 Jan 2019 11:25:17 +0100 Subject: [PATCH] Amend 7b639d2db212 Not the (ASCII) encoding matters here, but the (TU) font encoding. --- src/Paragraph.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; -- 2.39.5