]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_charinset.C
Georg Baum's vspace change
[lyx.git] / src / mathed / math_charinset.C
index 7e03bfcc7e7d1b34b51da9d747b6c92a62a10d71..50263400310b087d760266dbaa6187f7bc304832 100644 (file)
 #include <config.h>
 
 #include "math_charinset.h"
-#include "LColor.h"
-#include "dimension.h"
-#include "frontends/Painter.h"
-#include "frontends/font_metrics.h"
-#include "support/LOstream.h"
-#include "debug.h"
 #include "math_support.h"
 #include "math_mathmlstream.h"
-#include "LaTeXFeatures.h"
-#include "textpainter.h"
-
-#include <cctype>
-#include <cstring>
 
+#include "debug.h"
+#include "dimension.h"
+#include "textpainter.h"
 
-using std::ostream;
-using std::endl;
 using std::auto_ptr;
 
 #ifndef CXX_GLOBAL_CSTD
 using std::strchr;
-using std::isalpha;
 #endif
 
+
 extern bool has_math_fonts;
 
 namespace {
@@ -76,8 +66,8 @@ void MathCharInset::metrics(MetricsInfo & mi, Dimension & dim) const
        } else if ((char_ == '>' || char_ == '<') && has_math_fonts) {
                FontSetChanger dummy(mi.base, "cmm");
                mathed_char_dim(mi.base.font, char_, dim);
-       } else if (slanted(char_) && mi.base.fontname == "mathnormal") {
-               ShapeChanger dummy(mi.base.font, LyXFont::ITALIC_SHAPE);
+       } else if (!slanted(char_) && mi.base.fontname == "mathnormal") {
+               ShapeChanger dummy(mi.base.font, LyXFont::UP_SHAPE);
                mathed_char_dim(mi.base.font, char_, dim);
        } else {
                mathed_char_dim(mi.base.font, char_, dim);
@@ -112,8 +102,8 @@ void MathCharInset::draw(PainterInfo & pi, int x, int y) const
        } else if ((char_ == '>' || char_ == '<') && has_math_fonts) {
                FontSetChanger dummy(pi.base, "cmm");
                pi.draw(x, y, char_);
-       } else if (slanted(char_) && pi.base.fontname == "mathnormal") {
-               ShapeChanger dummy(pi.base.font, LyXFont::ITALIC_SHAPE);
+       } else if (!slanted(char_) && pi.base.fontname == "mathnormal") {
+               ShapeChanger dummy(pi.base.font, LyXFont::UP_SHAPE);
                pi.draw(x, y, char_);
        } else {
                pi.draw(x, y, char_);