]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathKern.cpp
Kill macro mode when using LFUN_ESCAPE
[lyx.git] / src / mathed / InsetMathKern.cpp
index eb445c382bae8b23d3f7ccad4d36f95fec14f27a..61ee6ee5b7db7cd7855fb887b1ac3450a4bd7aff 100644 (file)
@@ -49,11 +49,7 @@ void InsetMathKern::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        dim.asc = 0;
        dim.des = 0;
-       // match em value used in mathed_*muskip
-       FontInfo const oldfont = mi.base.font;
-       mi.base.font.setFamily(SYMBOL_FAMILY);
-       dim.wid = wid_.inPixels(mi.base);
-       mi.base.font = oldfont;
+       dim.wid = mi.base.inPixels(wid_);
 }
 
 
@@ -65,6 +61,8 @@ void InsetMathKern::write(WriteStream & os) const
 {
        if (wid_.empty())
                os << "\\kern" << ' ';
+       else if (wid_.unit() == Length::MU)
+               os << "\\mkern" << from_utf8(wid_.asLatexString()) << ' ';
        else
                os << "\\kern" << from_utf8(wid_.asLatexString()) << ' ';
 }
@@ -79,4 +77,12 @@ void InsetMathKern::normalize(NormalStream & os) const
 }
 
 
+void InsetMathKern::infoize2(odocstream & os) const
+{
+       os << "Kern";
+       if (!wid_.empty())
+               os << ": " << from_utf8(wid_.asLatexString());
+}
+
+
 } // namespace lyx