//
/////////////////////////////////////////////////////////////////////////
-MetricsBase::MetricsBase()
- : bv(0), font(), style(LM_ST_TEXT), fontname("mathnormal"), textwidth(0),
- solid_line_thickness_(1), solid_line_offset_(1), dotted_line_thickness_(1)
+MetricsBase::MetricsBase(BufferView * b, FontInfo f, int w)
+ : bv(b), font(move(f)), style(LM_ST_TEXT), fontname("mathnormal"),
+ textwidth(w), solid_line_thickness_(1), solid_line_offset_(1),
+ dotted_line_thickness_(1)
{
if (lyxrc.zoom >= 200) {
// derive the line thickness from zoom factor
// the zoom is given in percent
// (increase thickness at 250%, 450% etc.)
- solid_line_thickness_ = (lyxrc.zoom + 50) / 200;
+ solid_line_thickness_ = (lyxrc.zoom + 150) / 200;
// adjust line_offset_ too
solid_line_offset_ = 1 + solid_line_thickness_ / 2;
}
}
-MetricsBase::MetricsBase(BufferView * b, FontInfo f, int w)
- : MetricsBase()
-{
- bv = b;
- font = f;
- textwidth = w;
-}
-
-
Changer MetricsBase::changeFontSet(string const & name, bool cond)
{
RefChanger<MetricsBase> rc = make_save(*this);
ColorCode oldcolor = font.color();
string const oldname = fontname;
fontname = name;
- font = sane_font;
+ if (isMathFont(name) || isMathFont(oldname))
+ font = sane_font;
augmentFont(font, name);
font.setSize(rc->old.font.size());
if (name != "lyxtex"