X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmathed%2FInsetMathBrace.cpp;h=52ccc01b83055169b456241f980d95242a8eaa93;hb=bf56e2c8e1afa857cd5e313c19948040e41b8227;hp=4bf24dfb81e7ad3566e25f339f55da3a57eb2e3a;hpb=8a0134cc8ce7de41d6d6911a1c4219ca958f2b71;p=lyx.git diff --git a/src/mathed/InsetMathBrace.cpp b/src/mathed/InsetMathBrace.cpp index 4bf24dfb81..52ccc01b83 100644 --- a/src/mathed/InsetMathBrace.cpp +++ b/src/mathed/InsetMathBrace.cpp @@ -13,7 +13,6 @@ #include "InsetMathBrace.h" #include "MathData.h" -#include "MathExtern.h" #include "MathStream.h" #include "MathSupport.h" #include "MetricsInfo.h" @@ -22,6 +21,7 @@ #include "frontends/Painter.h" #include +#include using namespace std; @@ -49,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, "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; @@ -60,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, "mathnormal"); font.setShape(UP_SHAPE); font.setColor(Color_latex); Dimension t = theFontMetrics(font).dimension('{'); @@ -95,12 +98,15 @@ void InsetMathBrace::octave(OctaveStream & os) const } -docstring InsetMathBrace::mathmlize(MathStream & os) const +void InsetMathBrace::mathmlize(MathStream & os) const +{ + os << MTag("mrow") << cell(0) << ETag("mrow"); +} + + +void InsetMathBrace::htmlize(HtmlStream & os) const { - os << MTag("mrow"); - docstring const rv = lyx::mathmlize(cell(0), os); - os << ETag("mrow"); - return rv; + os << cell(0); }