#include "lyxrc.h" // lyxrc.font_*
#include "BufferView.h"
#include "LyXView.h"
-#include "minibuffer.h"
using std::endl;
reset();
}
+
// Destroy font loader
FontLoader::~FontLoader()
{
unload();
}
+
// Update fonts after zoom, dpi, font names, or norm change
// For now, we just ditch all fonts we have. Later, we should
// reuse the ones that are already loaded.
unload();
}
+
// Reset font loader
void FontLoader::reset()
{
}
}
+
// Unload all fonts
void FontLoader::unload()
{
}
}
+
// Get font info
/* Takes care of finding which font that can match the given request. Tries
different alternatives. */
}
-// A dummy fontstruct used when there is no gui.
-static XFontStruct dummyXFontStruct;
-static bool dummyXFontStructisGood = false;
+// A dummy fontstruct used when there is no gui.
+namespace {
+
+XFontStruct dummyXFontStruct;
+bool dummyXFontStructisGood = false;
+
+} // namespace anon
/// Do load font
XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family,
XFontStruct * fs = 0;
- current_view->owner()->getMiniBuffer()->Store();
- current_view->owner()->getMiniBuffer()->Set(_("Loading font into X-Server..."));
+ current_view->owner()->messagePush(_("Loading font into X-Server..."));
+
fs = XLoadQueryFont(fl_get_display(), font.c_str());
if (fs == 0) {
<< "' matched by\n" << font << endl;
}
- current_view->owner()->getMiniBuffer()->Reset();
+ current_view->owner()->messagePop();
fontstruct[family][series][shape][size] = fs;
return fs;