]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathFactory.C
Fix command-line export
[lyx.git] / src / mathed / MathFactory.C
index e9e40b4f49484d82910f68734ed4e6a1d9e7654b..85cf61c0c8843fd68eea1b652b8283da2d7d4b71 100644 (file)
@@ -60,7 +60,6 @@
 #include "support/filetools.h" // LibFileSearch
 #include "support/lstrings.h"
 
-#include "frontends/Application.h"
 #include "frontends/FontLoader.h"
 
 #include <fstream>
@@ -75,6 +74,9 @@ using std::istringstream;
 
 bool has_math_fonts;
 
+namespace lyx {
+extern bool use_gui;
+}
 
 namespace {
 
@@ -85,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 (theApp->fontLoader().available(f))
+       if (theFontLoader().available(f))
                return true;
 
        // can we fake it?