]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSymbol.cpp
Cmake export tests: Added sublabel handling also to revertedTests
[lyx.git] / src / mathed / InsetMathSymbol.cpp
index 0bd61d9b5f70fef9da99193e38b5afa27011d976..352352bdd66d2c937a9feff31fd4d17cef48015e 100644 (file)
@@ -67,7 +67,7 @@ void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const
                                         sym_->extra == "mathalpha" &&
                                         mi.base.fontname == "mathit";
        std::string const font = italic_upcase_greek ? "cmm" : sym_->inset;
-       int const em = mathed_char_width(mi.base.font, 'M');
+       int const em = mathed_font_em(mi.base.font);
        FontSetChanger dummy(mi.base, from_ascii(font));
        mathed_string_dim(mi.base.font, sym_->draw, dim);
        docstring::const_reverse_iterator rit = sym_->draw.rbegin();
@@ -87,7 +87,8 @@ void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const
        scriptable_ = false;
        if (mi.base.style == LM_ST_DISPLAY)
                if (sym_->inset == "cmex" || sym_->inset == "esint" ||
-                   sym_->extra == "funclim")
+                   sym_->extra == "funclim" ||
+                   (sym_->inset == "stmry" && sym_->extra == "mathop"))
                        scriptable_ = true;
 }
 
@@ -103,7 +104,7 @@ void InsetMathSymbol::draw(PainterInfo & pi, int x, int y) const
                                         sym_->extra == "mathalpha" &&
                                         pi.base.fontname == "mathit";
        std::string const font = italic_upcase_greek ? "cmm" : sym_->inset;
-       int const em = mathed_char_width(pi.base.font, 'M');
+       int const em = mathed_font_em(pi.base.font);
        if (isRelOp())
                x += static_cast<int>(0.25*em+0.5);
        else
@@ -144,7 +145,8 @@ bool InsetMathSymbol::takesLimits() const
                sym_->inset == "cmex" ||
                sym_->inset == "lyxboldsymb" ||
                sym_->inset == "esint" ||
-               sym_->extra == "funclim";
+               sym_->extra == "funclim" ||
+               (sym_->inset == "stmry" && sym_->extra == "mathop");
 }