#include "Length.h"
#include "LyXRC.h"
-#include "MetricsInfo.h"
-
-#include "frontends/FontMetrics.h"
#include "support/debug.h"
#include "support/docstream.h"
int Length::inPixels(int text_width, int em_width_base) const
{
// Zoom factor specified by user in percent
- double const zoom = lyxrc.zoom / 100.0; // [percent]
+ double const zoom = lyxrc.currentZoom / 100.0; // [percent]
// DPI setting for monitor: pixels/inch
double const dpi = lyxrc.dpi; // screen resolution [pixels/inch]
}
-int Length::inPixels(MetricsBase const & base) const
-{
- FontInfo fi = base.font;
- if (unit_ == Length::MU)
- // mu is 1/18th of an em in the math symbol font
- fi.setFamily(SYMBOL_FAMILY);
- else
- // Math style is only taken into account in the case of mu
- fi.setStyle(LM_ST_TEXT);
- return inPixels(base.textwidth, theFontMetrics(fi).em());
-}
-
-
int Length::inBP() const
{
// return any Length value as a one with