X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathBrace.cpp;h=8b06f6d546d06c9095814b75dd12c8209b764d61;hb=c9d9309c1ecffa218dee04ce4f7991ed4fc0c9bb;hp=d2d2e3fc162f0badeb9275fdc3c8dabb0e031eaf;hpb=f1cba8ff64b369792fd49f5ddf90e8126ab476ac;p=lyx.git diff --git a/src/mathed/InsetMathBrace.cpp b/src/mathed/InsetMathBrace.cpp index d2d2e3fc16..8b06f6d546 100644 --- a/src/mathed/InsetMathBrace.cpp +++ b/src/mathed/InsetMathBrace.cpp @@ -21,18 +21,19 @@ #include "frontends/Painter.h" #include +#include using namespace std; namespace lyx { -InsetMathBrace::InsetMathBrace() - : InsetMathNest(1) +InsetMathBrace::InsetMathBrace(Buffer * buf) + : InsetMathNest(buf, 1) {} InsetMathBrace::InsetMathBrace(MathData const & ar) - : InsetMathNest(1) + : InsetMathNest(const_cast(ar.buffer()), 1) { cell(0) = ar; } @@ -48,7 +49,9 @@ 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, from_ascii("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; @@ -59,6 +62,7 @@ void InsetMathBrace::metrics(MetricsInfo & mi, Dimension & dim) const void InsetMathBrace::draw(PainterInfo & pi, int x, int y) const { FontInfo font = pi.base.font; + augmentFont(font, from_ascii("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);