]> git.lyx.org Git - lyx.git/blobdiff - src/FontLoader.C
Remove unused font variable which caused a warning.
[lyx.git] / src / FontLoader.C
index 0f7e2d77823fa17d04310a32e426547bb17a98c6..5113988334a4b7a9db88832afc9e8f65732f990b 100644 (file)
 #pragma implementation "FontLoader.h"
 #endif
 
-#include "gettext.h"
 #include "FontLoader.h"
 #include "FontInfo.h"
+#include "gettext.h"
 #include "debug.h"
 #include "lyxrc.h"     // lyxrc.font_*
 #include "BufferView.h"
 #include "LyXView.h"
+#include "frontends/GUIRunTime.h"
 
 using std::endl;
 
@@ -83,7 +84,7 @@ void FontLoader::unload()
                                }
                                for (int i4 = 0; i4 < 10; ++i4) {
                                        if (fontstruct[i1][i2][i3][i4]) {
-                                               XFreeFont(fl_get_display(), fontstruct[i1][i2][i3][i4]);
+                                               XFreeFont(GUIRunTime::x11Display(), fontstruct[i1][i2][i3][i4]);
                                                fontstruct[i1][i2][i3][i4] = 0;
                                        }
                                }
@@ -251,14 +252,14 @@ XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family,
 
        current_view->owner()->messagePush(_("Loading font into X-Server..."));
 
-       fs = XLoadQueryFont(fl_get_display(), font.c_str());
+       fs = XLoadQueryFont(GUIRunTime::x11Display(), font.c_str());
        
        if (fs == 0) {
                if (font == "fixed") {
                        lyxerr << "We're doomed. Can't get 'fixed' font." << endl;
                } else {
                        lyxerr << "Could not get font. Using 'fixed'." << endl;
-                       fs = XLoadQueryFont(fl_get_display(), "fixed");
+                       fs = XLoadQueryFont(GUIRunTime::x11Display(), "fixed");
                }
        } else if (lyxerr.debugging(Debug::FONT)) {
                // Tell user the font matching
@@ -271,7 +272,9 @@ XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family,
                f.setEmph(LyXFont::INHERIT);
                f.setUnderbar(LyXFont::INHERIT);
                f.setNoun(LyXFont::INHERIT);
+#ifndef NO_LATEX
                f.setLatex(LyXFont::INHERIT);
+#endif
                f.setColor(LColor::inherit);
                lyxerr << "Font '" << f.stateText(0) 
                       << "' matched by\n" << font << endl;