]> git.lyx.org Git - features.git/commitdiff
Fix bug 2074: kern width wrong
authorMartin Vermeer <martin.vermeer@hut.fi>
Wed, 2 Nov 2005 12:57:47 +0000 (12:57 +0000)
committerMartin Vermeer <martin.vermeer@hut.fi>
Wed, 2 Nov 2005 12:57:47 +0000 (12:57 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10583 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/ChangeLog
src/mathed/math_kerninset.C
src/mathed/math_kerninset.h

index 263899e302d01d89dca6f945242e34eef235d89e..6f8aa85be9a180d1244334b243e9327ef66867db 100644 (file)
@@ -1,3 +1,7 @@
+2005-11-02  Martin Vermeer  <martin.vermeer@hut.fi>
+
+       * math_kerninset.[Ch]: fix 2074: kern width wrong
+
 2005-10-13  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
 
        * math_gridinset.[Ch] (eolString, write): Output \\ at the end of the last
index 00c8bcb99d70d81e0b9975f47d72449b50e1367d..d5e533997710a111ed9dff1465734ab6bdb9b59c 100644 (file)
@@ -42,12 +42,19 @@ auto_ptr<InsetBase> MathKernInset::doClone() const
 
 void MathKernInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       dim.wid = wid_.inPixels(0, mathed_char_width(mi.base.font, 'M'));
+       wid_pix_ = wid_.inPixels(0, mathed_char_width(mi.base.font, 'M'));
+       dim.wid = wid_pix_;
        dim.asc = 0;
        dim.des = 0;
 }
 
 
+int MathKernInset::width() const
+{
+       return wid_pix_;
+}
+
+
 void MathKernInset::draw(PainterInfo &, int, int) const
 {}
 
index 48d50638b817ea07a3ef28e8f410b66bb4313c50..817fbb4cf1e56c677ad9e83bb7c086e54057a97f 100644 (file)
@@ -35,9 +35,14 @@ public:
        void write(WriteStream & os) const;
        ///
        void normalize(NormalStream & ns) const;
+       ///
+       int width() const;
 private:
        virtual std::auto_ptr<InsetBase> doClone() const;
        /// width in em
        LyXLength wid_;
+       /// in pixels
+       mutable int wid_pix_;
+       
 };
 #endif