X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FEncoding.cpp;h=026ad3c43e190d8bbe48889d069a4cb948b5b45b;hb=f5f2f5b7eaca90ba9bbddee3cea54708c9b98a36;hp=b9cad8d2e00c55a937a8a57103e2089a11ab929c;hpb=a919d5b14a976ab9497833871376c93b6e511945;p=lyx.git diff --git a/src/Encoding.cpp b/src/Encoding.cpp index b9cad8d2e0..026ad3c43e 100644 --- a/src/Encoding.cpp +++ b/src/Encoding.cpp @@ -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);