]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathBrace.cpp
Get rid of Inset::setPosCache
[lyx.git] / src / mathed / InsetMathBrace.cpp
index c1034c9aeeb1f662e48478c7b8fb7e25493b6d2e..6870fa609dd5c212d54a6ddafed114871de8ee0f 100644 (file)
@@ -21,6 +21,7 @@
 #include "frontends/Painter.h"
 
 #include <ostream>
+#include <algorithm>
 
 using namespace std;
 
@@ -48,17 +49,20 @@ void InsetMathBrace::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        Dimension dim0;
        cell(0).metrics(mi, dim0);
-       Dimension t = theFontMetrics(mi.base.font).dimension('{');
+       FontInfo font = mi.base.font;
+       augmentFont(font, "mathnormal");
+       Dimension t = theFontMetrics(font).dimension('{');
        dim.asc = max(dim0.asc, t.asc);
        dim.des = max(dim0.des, t.des);
        dim.wid = dim0.width() + 2 * t.wid;
-       metricsMarkers(dim);
+       metricsMarkers(mi, dim);
 }
 
 
 void InsetMathBrace::draw(PainterInfo & pi, int x, int y) const
 {
        FontInfo font = pi.base.font;
+       augmentFont(font, "mathnormal");
        font.setShape(UP_SHAPE);
        font.setColor(Color_latex);
        Dimension t = theFontMetrics(font).dimension('{');
@@ -100,6 +104,12 @@ void InsetMathBrace::mathmlize(MathStream & os) const
 }
 
 
+void InsetMathBrace::htmlize(HtmlStream & os) const
+{
+       os << cell(0);
+}
+
+
 void InsetMathBrace::mathematica(MathematicaStream & os) const
 {
        os << cell(0);