2 * \file math_fontoldinset.C
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 "math_fontoldinset.h"
14 #include "math_data.h"
15 #include "math_mathmlstream.h"
16 #include "math_parser.h"
17 #include "math_streamstr.h"
18 #include "support/std_ostream.h"
23 MathFontOldInset::MathFontOldInset(latexkeys const * key)
24 : MathNestInset(1), key_(key)
30 auto_ptr<InsetBase> MathFontOldInset::doClone() const
32 return auto_ptr<InsetBase>(new MathFontOldInset(*this));
36 void MathFontOldInset::metrics(MetricsInfo & mi, Dimension & dim) const
38 FontSetChanger dummy(mi.base, key_->name.c_str());
39 cell(0).metrics(mi, dim);
45 void MathFontOldInset::draw(PainterInfo & pi, int x, int y) const
47 FontSetChanger dummy(pi.base, key_->name.c_str());
48 cell(0).draw(pi, x + 1, y);
49 drawMarkers(pi, x, y);
53 void MathFontOldInset::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
55 cell(0).metricsT(mi, dim);
59 void MathFontOldInset::drawT(TextPainter & pain, int x, int y) const
61 cell(0).drawT(pain, x, y);
65 void MathFontOldInset::write(WriteStream & os) const
67 os << "{\\" << key_->name << ' ' << cell(0) << '}';
71 void MathFontOldInset::normalize(NormalStream & os) const
73 os << "[font " << key_->name << ' ' << cell(0) << ']';
77 void MathFontOldInset::infoize(std::ostream & os) const
79 os << "Font: " << key_->name;