2 * \file InsetMathKern.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 "InsetMathKern.h"
14 #include "MathStream.h"
15 #include "MathStream.h"
16 #include "MathSupport.h"
17 #include "dimension.h"
26 InsetMathKern::InsetMathKern()
33 InsetMathKern::InsetMathKern(LyXLength const & w)
41 InsetMathKern::InsetMathKern(docstring const & s)
49 auto_ptr<InsetBase> InsetMathKern::doClone() const
51 return auto_ptr<InsetBase>(new InsetMathKern(*this));
55 bool InsetMathKern::metrics(MetricsInfo & mi, Dimension & dim) const
57 int wid_pixel = wid_.inPixels(0, mathed_char_width(mi.base.font, 'M'));
58 if (wid_pixel == dim_.wid)
66 void InsetMathKern::draw(PainterInfo &, int, int) const
70 void InsetMathKern::write(WriteStream & os) const
72 os << "\\kern" << from_utf8(wid_.asLatexString()) << ' ';
76 void InsetMathKern::normalize(NormalStream & os) const
78 os << "[kern " << from_utf8(wid_.asLatexString()) << ']';