]> git.lyx.org Git - lyx.git/blobdiff - src/metricsinfo.C
* GuiView.C (updateTab): do not update early if current tab has
[lyx.git] / src / metricsinfo.C
index bf4ed3dd8a6e718b2a1feaece78729d0226d03be..9544e68883c464c85566db05bda984a00992a269 100644 (file)
@@ -20,8 +20,8 @@
 
 #include <boost/assert.hpp>
 
-using lyx::char_type;
-using lyx::docstring;
+
+namespace lyx {
 
 using std::string;
 
@@ -163,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<MetricsBase>(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);
 }
@@ -202,3 +214,6 @@ ColorChanger::~ColorChanger()
 {
        orig_.setColor(lcolor.getFromLyXName(save_));
 }
+
+
+} // namespace lyx