]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
Revert "Fixup 0cbe0d7a: avoid double redraw when completion is finished"
[lyx.git] / src / Font.cpp
index 514bf03725fc40f6b3584b6920bab9eabeade35b..0e4aa2b24b42cef0192685998baa12eaa19d515e 100644 (file)
@@ -294,7 +294,7 @@ int Font::latexWriteStartChanges(otexstream & os, BufferParams const & bparams,
                        os << "\\textLR{";
                        count += 8;
                // currently the remaining RTL languages are arabic_arabtex and hebrew
-               } else if (isRightToLeft() != prev.isRightToLeft()) {
+               } else if (isRightToLeft() != prev.isRightToLeft() && !runparams.isFullUnicode()) {
                        if (needs_cprotection) {
                                os << "\\cprotect";
                                count += 9;
@@ -336,11 +336,18 @@ int Font::latexWriteStartChanges(otexstream & os, BufferParams const & bparams,
        p.reduce(prev.bits_);
 
        if (f.size() != INHERIT_SIZE) {
-               os << '{';
-               ++count;
-               os << '\\'
-                  << LaTeXSizeSwitchNames[f.size()] << termcmd;
-               count += strlen(LaTeXSizeSwitchNames[f.size()]) + 1;
+               if (!runparams.find_effective()) {
+                       os << '{';
+                       ++count;
+                       os << '\\'
+                          << LaTeXSizeSwitchNames[f.size()] << termcmd;
+                       count += strlen(LaTeXSizeSwitchNames[f.size()]) + 1;
+               }
+               else {
+                       os << '\\'
+                          << LaTeXSizeSwitchNames[f.size()] << '{';
+                       count += strlen(LaTeXSizeSwitchNames[f.size()]) + 2;
+               }
        }
        if (f.family() != INHERIT_FAMILY) {
                if (non_inherit_inset) {