+2002-07-12 John Levon <moz@compsoc.man.ac.uk>
+
+ * lyxfunc.C: use lyx_gui::update_fonts()
+
2002-07-12 John Levon <moz@compsoc.man.ac.uk>
* lyxfunc.C: use lyx_gui::update_color()
+2002-07-12 John Levon <moz@compsoc.man.ac.uk>
+
+ * Makefile.am:
+ * font_loader.h: remove
+
+ * lyx_gui.h: add update_fonts(), font_available()
+
2002-07-12 John Levon <moz@compsoc.man.ac.uk>
* lyx_gui.h: add update_color
WorkArea.C \
WorkArea.h \
WorkAreaFactory.h \
- font_loader.h \
font_metrics.h \
guiapi.h \
key_state.h \
+++ /dev/null
-// very temporary
-
-#include "xforms/xfont_loader.h"
#include <vector>
class Dialogs;
+class LyXFont;
/// GUI interaction
namespace lyx_gui {
* update an altered GUI color
*/
void update_color(LColor::color col);
+
+ /**
+ * update the font cache
+ */
+ void update_fonts();
+
+ /**
+ * is the given font available ?
+ */
+ bool font_available(LyXFont const & font);
}
#endif // LYX_GUI_H
+2002-07-12 John Levon <moz@compsoc.man.ac.uk>
+
+ * lyx_gui.C: implement update_fonts(), font_available()
+
2002-07-12 John Levon <moz@compsoc.man.ac.uk>
* lyx_gui.C: add un-needed update_color()
Those with asterisks are what I perceive as being "big jobs"
-ColorHandler
-
- - remove mentions in core code
-
FileDialog
- add buttons for Documents, Templates, etc. to the file dialog toolbar
#include "lyx_gui.h"
#include "lyx_main.h"
#include "lyxrc.h"
+#include "lyxfont.h"
// FIXME: move this stuff out again
#include "bufferlist.h"
#include "QtView.h"
#include "QLImage.h"
+#include "qfont_loader.h"
#include <qapplication.h>
}
-void lyx_gui::update_color(LColor::color col)
+void lyx_gui::update_color(LColor::color)
{
// no need
}
+
+
+void lyx_gui::update_fonts()
+{
+ fontloader.update();
+}
+
+
+bool lyx_gui::font_available(LyXFont const & font)
+{
+ return fontloader.available(font);
+}
public:
qfont_loader();
- virtual ~qfont_loader();
+ ~qfont_loader();
/// update fonts after zoom, dpi, font names, or norm change
- virtual void update();
+ void update();
/// do we have anything matching?
- virtual bool available(LyXFont const & f);
+ bool available(LyXFont const & f);
/// get the QFont for this LyXFont
QFont const & get(LyXFont const & f) {
+2002-07-12 John Levon <moz@compsoc.man.ac.uk>
+
+ * lyx_gui.C: implement update_fonts(), font_available()
+
2002-07-12 John Levon <moz@compsoc.man.ac.uk>
* lyx_gui.C: add update_color()
#include "lyx_main.h"
#include "lyxrc.h"
+#include "lyxfont.h"
// FIXME: move this stuff out again
#include "bufferlist.h"
#include FORMS_H_LOCATION
#include "ColorHandler.h"
#include "xforms_helpers.h"
+#include "xfont_loader.h"
#ifdef USE_XFORMS_IMAGE_LOADER
#include "xformsImage.h"
#else
{
lyxColorHandler->updateColor(col);
}
+
+
+void lyx_gui::update_fonts()
+{
+ fontloader.update();
+}
+
+
+bool lyx_gui::font_available(LyXFont const & font)
+{
+ return fontloader.available(font);
+}
#include <utility>
#include <algorithm>
-#include "frontends/font_loader.h"
-
using std::pair;
using std::make_pair;
using std::endl;
// handle the screen font changes.
//
lyxrc.set_font_norm_type();
- fontloader.update();
+ lyx_gui::update_fonts();
// Of course we should only do the resize and the textcache.clear
// if values really changed...but not very important right now. (Lgb)
// All visible buffers will need resize
+2002-07-12 John Levon <moz@compsoc.man.ac.uk>
+
+ * math_support.C:
+ * math_factory.C: use lyx_gui::font_available()
+
2002-07-09 Angus Leeming <leeming@lyx.org>
* math_braceinset.h:
#include "math_support.h"
#include "Lsstream.h"
#include "support/filetools.h" // LibFileSearch
-#include "frontends/font_loader.h"
+#include "frontends/lyx_gui.h"
#include <map>
#include <fstream>
augmentFont(f, name);
// Do we have the font proper?
- if (fontloader.available(f))
+ if (lyx_gui::font_available(f))
return true;
// can we fake it?
#include "math_parser.h"
#include "frontends/Painter.h"
#include "frontends/font_metrics.h"
-#include "frontends/font_loader.h"
+#include "frontends/lyx_gui.h"
#include "debug.h"
#include "commandtags.h"
#include "dimension.h"
initialized = true;
// fake fonts if necessary
- if (!fontloader.available(getFont("mathfrak")))
+ if (!lyx_gui::font_available(getFont("mathfrak")))
fakeFont("mathfrak", "lyxfakefrak");
- if (!fontloader.available(getFont("mathcal")))
+ if (!lyx_gui::font_available(getFont("mathcal")))
fakeFont("mathcal", "lyxfakecal");
}
fontinfo * info = searchFont(name);