]> git.lyx.org Git - lyx.git/blobdiff - src/Encoding.cpp
Revert "Use swap in InsetText::updateBuffer for notes ad friends"
[lyx.git] / src / Encoding.cpp
index b9cad8d2e00c55a937a8a57103e2089a11ab929c..026ad3c43e190d8bbe48889d069a4cb948b5b45b 100644 (file)
@@ -588,7 +588,8 @@ bool Encodings::isKnownScriptChar(char_type const c, string & preamble)
        if (it == unicodesymbols.end())
                return false;
 
-       if (it->second.textpreamble() != "textgreek" && it->second.textpreamble() != "textcyr")
+       if (it->second.textpreamble() != "textgreek"
+           && it->second.textpreamble() != "textcyrillic")
                return false;
 
        if (preamble.empty()) {
@@ -599,6 +600,18 @@ bool Encodings::isKnownScriptChar(char_type const c, string & preamble)
 }
 
 
+bool Encodings::needsScriptWrapper(string const & script, string const & fontenc)
+{
+       if (script == "textgreek")
+               return (fontenc != "LGR");
+       if (script == "textcyrillic") {
+               return (fontenc != "T2A" && fontenc != "T2B"
+                       && fontenc != "T2C" && fontenc != "X2");
+       }
+       return false;
+}
+
+
 bool Encodings::isMathAlpha(char_type c)
 {
        return mathalpha.count(c);