Back to topic, here is the patch. The problem was that InsetMathKern::metrics's logic was wrong: it computed the kerning, compared it to the old one, but forgot to update the dim parameter.

Anybody tried it? A second OK would be needed.

Stefan

Stefan

Index: lyx-devel/src/mathed/InsetMathKern.cpp
===================================================================
--- lyx-devel.orig/src/mathed/InsetMathKern.cpp 2007-05-11 21:39:35.000000000 +0200 +++ lyx-devel/src/mathed/InsetMathKern.cpp 2007-06-13 09:03:36.000000000 +0200
@@ -25,24 +25,18 @@

 InsetMathKern::InsetMathKern()
 {
-       dim_.asc = 0;
-       dim_.des = 0;
 }


 InsetMathKern::InsetMathKern(Length const & w)
        : wid_(w)
 {
-       dim_.asc = 0;
-       dim_.des = 0;
 }


 InsetMathKern::InsetMathKern(docstring const & s)
        : wid_(to_utf8(s))
 {
-       dim_.asc = 0;
-       dim_.des = 0;
 }


@@ -54,11 +48,12 @@

 bool InsetMathKern::metrics(MetricsInfo & mi, Dimension & dim) const
 {
- int wid_pixel = wid_.inPixels(0, mathed_char_width(mi.base.font, 'M'));
-       if (wid_pixel == dim_.wid)
+       dim.asc = 0;
+       dim.des = 0;
+       dim.wid = wid_.inPixels(0, mathed_char_width(mi.base.font, 'M'));
+       if (dim == dim_)
                return false;
-       dim_.wid = wid_pixel;
-       dim = dim_;
+       dim_ = dim;
        return true;
 }


<neqmetrics.patch>

Attachment: PGP.sig
Description: Signierter Teil der Nachricht

Reply via email to