X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathKern.cpp;h=d223887e3b6c2d712f0c9a4a1b577dc1e285b70c;hb=f2f7ea9edcdafb0e02d91cc2af53185154d41bd8;hp=eb445c382bae8b23d3f7ccad4d36f95fec14f27a;hpb=ad7e2435cfdb3eb7ac3ed4e7c3e2db804c3c2ff9;p=lyx.git diff --git a/src/mathed/InsetMathKern.cpp b/src/mathed/InsetMathKern.cpp index eb445c382b..d223887e3b 100644 --- a/src/mathed/InsetMathKern.cpp +++ b/src/mathed/InsetMathKern.cpp @@ -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; } @@ -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