#include "frontends/Painter.h"
+#include "support/docstring.h"
+
#include <boost/assert.hpp>
+using namespace std;
namespace lyx {
-using std::string;
-
MetricsBase::MetricsBase()
: bv(0), font(), style(LM_ST_TEXT), fontname("mathnormal"),
{}
-
-MetricsInfo::MetricsInfo()
-{}
-
-
-MetricsInfo::MetricsInfo(BufferView * bv, FontInfo const & font, int textwidth)
- : base(bv, font, textwidth)
+MetricsInfo::MetricsInfo(BufferView * bv, FontInfo const & font, int textwidth,
+ MacroContext const & mc)
+ : base(bv, font, textwidth), macrocontext(mc)
{}
-
PainterInfo::PainterInfo(BufferView * bv, lyx::frontend::Painter & painter)
: pain(painter), ltr_pos(false), erased_(false), full_repaint(true),
background_color(Color_background)
{}
-
ShapeChanger::ShapeChanger(FontInfo & font, FontShape shape)
: Changer<FontInfo, FontShape>(font)
{
save_ = mb;
FontSize oldsize = save_.font.size();
mb.fontname = name;
- mb.font = FontInfo();
+ mb.font = sane_font;
augmentFont(mb.font, from_ascii(name));
mb.font.setSize(oldsize);
}
save_ = mb;
FontSize oldsize = save_.font.size();
mb.fontname = to_utf8(name);
- mb.font = FontInfo();
+ mb.font = sane_font;
augmentFont(mb.font, name);
mb.font.setSize(oldsize);
}