]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_metricsinfo.C
Jean-Marc's fix for wrong descent
[lyx.git] / src / mathed / math_metricsinfo.C
index 15f2ed82e9fd521617fd9b3f6fb19ba9ead332fc..8b106a1d62dbc9aef1086446dc81391f1eb6d26d 100644 (file)
@@ -77,6 +77,11 @@ MathFracChanger::MathFracChanger(MathMetricsBase & mb)
 
 
 
+MathArrayChanger::MathArrayChanger(MathMetricsBase & mb)
+       : MathStyleChanger(mb, mb.style == LM_ST_DISPLAY ? LM_ST_TEXT : mb.style)
+{}
+
+
 MathShapeChanger::MathShapeChanger(LyXFont & font, LyXFont::FONT_SHAPE shape)
        : MathChanger<LyXFont, LyXFont::FONT_SHAPE>(font)
 {
@@ -95,15 +100,15 @@ MathStyleChanger::MathStyleChanger(MathMetricsBase & mb, MathStyles style)
        :       MathChanger<MathMetricsBase>(mb)
 {
        static const int diff[4][4]  = { { 0, 0, -3, -5 },
-                                        { 0, 0, -3, -5 },
-                                        { 3, 3,  0, -2 },
-                                        { 5, 5,  2,  0 } };
+                                        { 0, 0, -3, -5 },
+                                        { 3, 3,  0, -2 },
+                                        { 5, 5,  2,  0 } };
        save_ = mb;
        int t = diff[mb.style][style];
-       if (t > 0) 
+       if (t > 0)
                while (t--)
                        mb.font.incSize();
-       else 
+       else
                while (t++)
                        mb.font.decSize();
        mb.style = style;
@@ -119,7 +124,7 @@ MathStyleChanger::~MathStyleChanger()
 MathFontSetChanger::MathFontSetChanger(MathMetricsBase & mb, char const * name)
        :       MathChanger<MathMetricsBase>(mb)
 {
-       save_ = mb;     
+       save_ = mb;
        mb.fontname = name;
        augmentFont(mb.font, name);
 }
@@ -133,7 +138,7 @@ MathFontSetChanger::~MathFontSetChanger()
 MathWidthChanger::MathWidthChanger(MathMetricsBase & mb, int w)
        :       MathChanger<MathMetricsBase>(mb)
 {
-       save_ = mb;     
+       save_ = mb;
        mb.restrictwidth = true;
        mb.textwidth     = w;
 }
@@ -143,4 +148,3 @@ MathWidthChanger::~MathWidthChanger()
 {
        orig_ = save_;
 }
-