2 * \file InsetMathFontOld.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "InsetMathFontOld.h"
16 #include "MathStream.h"
17 #include "MathParser.h"
18 #include "MetricsInfo.h"
25 InsetMathFontOld::InsetMathFontOld(latexkeys const * key)
26 : InsetMathNest(1), key_(key)
32 Inset * InsetMathFontOld::clone() const
34 return new InsetMathFontOld(*this);
38 void InsetMathFontOld::metrics(MetricsInfo & mi, Dimension & dim) const
40 FontSetChanger dummy(mi.base, key_->name.c_str());
41 cell(0).metrics(mi, dim);
46 void InsetMathFontOld::draw(PainterInfo & pi, int x, int y) const
48 FontSetChanger dummy(pi.base, key_->name.c_str());
49 cell(0).draw(pi, x + 1, y);
50 drawMarkers(pi, x, y);
54 void InsetMathFontOld::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
56 cell(0).metricsT(mi, dim);
60 void InsetMathFontOld::drawT(TextPainter & pain, int x, int y) const
62 cell(0).drawT(pain, x, y);
66 void InsetMathFontOld::write(WriteStream & os) const
68 os << "{\\" << key_->name << ' ' << cell(0) << '}';
72 void InsetMathFontOld::normalize(NormalStream & os) const
74 os << "[font " << key_->name << ' ' << cell(0) << ']';
78 void InsetMathFontOld::infoize(odocstream & os) const
80 os << "Font: " << key_->name;