]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathSymbol.C
This commit fixes a crash when accessing a math inset. This was due to an invalid...
[lyx.git] / src / mathed / InsetMathSymbol.C
index 1aa9ba0f857801c52e25efe3935f705ec0c682fa..70d747df1d1115ab772d4e7bcf952afe76b2b2cb 100644 (file)
@@ -62,7 +62,8 @@ void InsetMathSymbol::metrics(MetricsInfo & mi, Dimension & dim) const
 
        int const em = mathed_char_width(mi.base.font, 'M');
        FontSetChanger dummy(mi.base, sym_->inset.c_str());
-       mathed_string_dim(mi.base.font, sym_->draw, dim);
+       // FIXME UNICODE
+       mathed_string_dim(mi.base.font, lyx::from_utf8(sym_->draw), dim);
        // correct height for broken cmex and wasy font
 #if defined(__APPLE__) && defined(__GNUC__)
        if (sym_->inset == "cmex") {
@@ -110,9 +111,8 @@ void InsetMathSymbol::draw(PainterInfo & pi, int x, int y) const
                x += static_cast<int>(0.0833*em+0.5);
 
        FontSetChanger dummy(pi.base, sym_->inset.c_str());
-        string const sym = sym_->draw;
-        docstring const dsym(sym.begin(), sym.end());
-       pi.draw(x, y - h_, dsym);
+       // FIXME UNICODE
+       pi.draw(x, y - h_, lyx::from_utf8(sym_->draw));
 }