X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmetricsinfo.C;h=9544e68883c464c85566db05bda984a00992a269;hb=7aa50e8f2bc942e4bb3d7a45e62fdfbe6a21654e;hp=bb14576342a68163af4a899f3c9e440fb3994421;hpb=c46b7d89553209b8df4e9de392ee07ef711f092f;p=lyx.git diff --git a/src/metricsinfo.C b/src/metricsinfo.C index bb14576342..9544e68883 100644 --- a/src/metricsinfo.C +++ b/src/metricsinfo.C @@ -14,14 +14,14 @@ #include "LColor.h" #include "metricsinfo.h" -#include "mathed/math_support.h" +#include "mathed/MathSupport.h" #include "frontends/Painter.h" #include -using lyx::char_type; -using lyx::docstring; + +namespace lyx { using std::string; @@ -113,6 +113,7 @@ ArrayChanger::ArrayChanger(MetricsBase & mb) {} + ShapeChanger::ShapeChanger(LyXFont & font, LyXFont::FONT_SHAPE shape) : Changer(font) { @@ -120,6 +121,7 @@ ShapeChanger::ShapeChanger(LyXFont & font, LyXFont::FONT_SHAPE shape) orig_.setShape(shape); } + ShapeChanger::~ShapeChanger() { orig_.setShape(save_); @@ -161,6 +163,18 @@ FontSetChanger::FontSetChanger(MetricsBase & mb, char const * name) LyXFont::FONT_SIZE oldsize = save_.font.size(); mb.fontname = name; mb.font = LyXFont(); + augmentFont(mb.font, from_ascii(name)); + mb.font.setSize(oldsize); +} + + +FontSetChanger::FontSetChanger(MetricsBase & mb, docstring const & name) + : Changer(mb) +{ + save_ = mb; + LyXFont::FONT_SIZE oldsize = save_.font.size(); + mb.fontname = to_utf8(name); + mb.font = LyXFont(); augmentFont(mb.font, name); mb.font.setSize(oldsize); } @@ -200,3 +214,6 @@ ColorChanger::~ColorChanger() { orig_.setColor(lcolor.getFromLyXName(save_)); } + + +} // namespace lyx