]> git.lyx.org Git - lyx.git/blobdiff - src/Encoding.cpp
Remove special code for CJK that is no longer required (amends e665715fc4).
[lyx.git] / src / Encoding.cpp
index 9966e710d8f8ed6201187079c1c923ce668b409a..5c0681903593b475b4cb8e7f38b1ffec1e6e044a 100644 (file)
@@ -580,7 +580,7 @@ string const Encodings::TIPAShortcut(char_type c)
        return string();
 }
 
-
+// Return true, if `c` is a supported Greek or Cyrillic letter.
 bool Encodings::isKnownScriptChar(char_type const c, string & preamble)
 {
        CharInfoMap::const_iterator const it = unicodesymbols.find(c);
@@ -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()) {
@@ -601,14 +602,14 @@ bool Encodings::isKnownScriptChar(char_type const c, string & preamble)
 
 bool Encodings::needsScriptWrapper(string const & script, string const & fontenc)
 {
+       // Note: the wrapper is not required with Unicode font encoding "TU".
+       // However, this function is not called with non-TeX (Unicode) fonts.
        if (script == "textgreek")
                return (fontenc != "LGR");
-       if (script == "textcyr") {
+       if (script == "textcyrillic") {
                return (fontenc != "T2A" && fontenc != "T2B"
                        && fontenc != "T2C" && fontenc != "X2");
        }
-       if (script == "textbaltic")
-               return (fontenc != "L7x");
        return false;
 }