#include "lyxlex.h"
#include "LColor.h"
-#include "frontends/Application.h"
-#include "frontends/FontLoader.h"
#include "frontends/FontMetrics.h"
#include "frontends/Painter.h"
cell(1).metrics(mi);
docstring dp = prefix();
dim.wid = cell(0).width() + cell(1).width() + 20
- + theApp->fontLoader().metrics(mi.base.font).width(dp);
+ + theFontMetrics(mi.base.font).width(dp);
dim.asc = std::max(cell(0).ascent(), cell(1).ascent()) + 7;
dim.des = std::max(cell(0).descent(), cell(1).descent()) + 7;
dim_ = dim;
docstring dp = prefix();
pi.pain.text(x + 2, y, dp, font);
// FIXME: Painter text should retain the drawn text width
- x += theApp->fontLoader().metrics(font).width(dp) + 6;
+ x += theFontMetrics(font).width(dp) + 6;
int const w0 = cell(0).width();
int const w1 = cell(1).width();
void MathMacroTemplate::write(Buffer const &, std::ostream & os) const
{
- WriteStream wi(os, false, false);
- os << "FormulaMacro\n";
+ lyx::odocstringstream oss;
+ WriteStream wi(oss, false, false);
+ oss << "FormulaMacro\n";
write(wi);
+ os << lyx::to_utf8(oss.str());
}