diff --git a/src/mathed/InsetMathFontOld.h b/src/mathed/InsetMathFontOld.h index 734fabc3e7..3cdf775602 100644 --- a/src/mathed/InsetMathFontOld.h +++ b/src/mathed/InsetMathFontOld.h @@ -43,6 +43,8 @@ public: void normalize(NormalStream &) const; /// void infoize(odocstream & os) const; + /// + int kerning() const { return cell(0).kerning(); } private: virtual std::auto_ptr doClone() const; diff --git a/src/mathed/InsetMathUnknown.C b/src/mathed/InsetMathUnknown.C index 302c913829..b99e5e6404 100644 --- a/src/mathed/InsetMathUnknown.C +++ b/src/mathed/InsetMathUnknown.C @@ -56,6 +56,8 @@ void InsetMathUnknown::normalize(NormalStream & os) const bool InsetMathUnknown::metrics(MetricsInfo & mi, Dimension & dim) const { mathed_string_dim(mi.base.font, name_, dim); + docstring::const_reverse_iterator rit = name_.rbegin(); + kerning_ = mathed_char_kerning(mi.base.font, *rit); if (dim_ == dim) return false; dim_ = dim; diff --git a/src/mathed/InsetMathUnknown.h b/src/mathed/InsetMathUnknown.h index d1ab2bc50a..9d30e19807 100644 --- a/src/mathed/InsetMathUnknown.h +++ b/src/mathed/InsetMathUnknown.h @@ -51,6 +51,8 @@ public: void finalize(); /// bool final() const; + /// + int kerning() const { return kerning_; } private: virtual std::auto_ptr doClone() const; /// @@ -59,6 +61,8 @@ private: bool final_; /// bool black_; + /// + mutable int kerning_; };