]> git.lyx.org Git - features.git/commitdiff
Fix/simplify "if" clause for application of \textcyrrillic or \textgreek.
authorGünter Milde <milde@lyx.org>
Sat, 2 Mar 2019 19:24:05 +0000 (20:24 +0100)
committerGünter Milde <milde@lyx.org>
Sun, 3 Mar 2019 23:04:03 +0000 (00:04 +0100)
Also with Xe/LuaTeX only required with non-native font encodings.

src/Paragraph.cpp

index 0ad14ce353ae664e5c51a155103e10b28270b5ca..27aecb5eaee7fc4af6a211e6617136b572ed97a4 100644 (file)
@@ -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;