]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/xfont_loader.C
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / xforms / xfont_loader.C
index b0728d687b425e3d8f7618ba7dadd9ed57a11d2c..28030cb45beb3672fa84e5a29dfd6b4ab5416787 100644 (file)
@@ -5,26 +5,37 @@
  *
  * \author Asger Alstrup
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
-#include <cmath>       // fabs()
-
 
 #include "xfont_loader.h"
 #include "FontInfo.h"
-#include "gettext.h"
+
 #include "debug.h"
+#include "LColor.h"
 #include "lyxrc.h"     // lyxrc.font_*
-#include "BufferView.h"
-#include "frontends/LyXView.h"
-#include "support/systemcall.h"
+
+#include "frontends/lyx_gui.h"
+
 #include "support/filetools.h"
+#include "support/systemcall.h"
 
-#include FORMS_H_LOCATION
+#include "lyx_forms.h"
+
+#include <algorithm>
 
 using std::endl;
+using std::string;
+
+namespace lyx {
+
+using support::LibFileSearch;
+using support::OnlyPath;
+using support::Systemcall;
+
+namespace frontend {
 
 // The global fontloader
 xfont_loader fontloader;
@@ -304,7 +315,7 @@ XFontStruct * xfont_loader::doLoad(LyXFont::FONT_FAMILY family,
                                LyXFont::FONT_SHAPE shape,
                                LyXFont::FONT_SIZE size)
 {
-       if (!lyxrc.use_gui) {
+       if (!lyx_gui::use_gui) {
                if (!dummyXFontStructisGood) {
                        // no character specific info
                        dummyXFontStruct.per_char = 0;
@@ -366,10 +377,13 @@ XFontStruct * xfont_loader::doLoad(LyXFont::FONT_FAMILY family,
 
 bool xfont_loader::available(LyXFont const & f)
 {
-       if (!lyxrc.use_gui)
+       if (!lyx_gui::use_gui)
                return false;
 
        if (!fontinfo[f.family()][f.series()][f.realShape()])
                getFontinfo(f.family(), f.series(), f.realShape());
        return fontinfo[f.family()][f.series()][f.realShape()]->exist();
 }
+
+} // namespace frontend
+} // namespace lyx