]> git.lyx.org Git - lyx.git/blobdiff - src/Encoding.cpp
Add support for the URW Classico (Optima) LaTeX font
[lyx.git] / src / Encoding.cpp
index b758787e28ddaa0bd55c66e99b5faf6e9bce4a33..3325301a7c579082ca3844c087f536cf6802749d 100644 (file)
@@ -697,8 +697,12 @@ void Encodings::validate(char_type c, LaTeXFeatures & features, bool for_mathed)
                bool const use_text = (for_mathed && isTextCmd(c)) ||
                                      (!for_mathed && !it->second.textcommand.empty());
                bool const plain_utf8 = (features.runparams().encoding->name() == "utf8-plain");
+               bool const unicode_math = (features.isRequired("unicode-math")
+                       && features.isAvailable("unicode-math"));
                // with utf8-plain, we only load packages when in mathed (see #7766)
-               if (math_mode || (use_math && !plain_utf8)) {
+               // and if we do not use unicode-math
+               if ((math_mode && !unicode_math)
+                    || (use_math && !plain_utf8)) {
                        if (!it->second.mathpreamble.empty()) {
                                if (it->second.mathfeature()) {
                                        string feats = it->second.mathpreamble;