]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathFactory.C
Fix command-line export
[lyx.git] / src / mathed / MathFactory.C
index fd322961d4f82c45726fc121fab55b114955e65c..85cf61c0c8843fd68eea1b652b8283da2d7d4b71 100644 (file)
@@ -60,7 +60,7 @@
 #include "support/filetools.h" // LibFileSearch
 #include "support/lstrings.h"
 
-#include "frontends/lyx_gui.h"
+#include "frontends/FontLoader.h"
 
 #include <fstream>
 #include <sstream>
@@ -74,6 +74,9 @@ using std::istringstream;
 
 bool has_math_fonts;
 
+namespace lyx {
+extern bool use_gui;
+}
 
 namespace {
 
@@ -84,11 +87,14 @@ WordList theWordList;
 
 bool math_font_available(string & name)
 {
+       if (!lyx::use_gui)
+               return false;
+
        LyXFont f;
        augmentFont(f, name);
 
        // Do we have the font proper?
-       if (lyx_gui::font_available(f))
+       if (theFontLoader().available(f))
                return true;
 
        // can we fake it?
@@ -274,6 +280,8 @@ MathAtom createInsetMath(string const & s)
                        return MathAtom(new InsetMathFontOld(l));
                if (inset == "matrix")
                        return MathAtom(new InsetMathAMSArray(s));
+               if (inset == "split")
+                       return MathAtom(new InsetMathSplit(s));
                if (inset == "big")
                        // we can't create a InsetMathBig, since the argument
                        // is missing.