]> git.lyx.org Git - features.git/blobdiff - src/Length.cpp
DocBook: refactor font handling.
[features.git] / src / Length.cpp
index 42188d8929e444387efbaec46668283ee49fbad7..d2868828b3875ec238ce3a86a3e9295384efb979 100644 (file)
@@ -17,9 +17,6 @@
 
 #include "Length.h"
 #include "LyXRC.h"
-#include "MetricsInfo.h"
-
-#include "frontends/FontMetrics.h"
 
 #include "support/debug.h"
 #include "support/docstream.h"
@@ -309,19 +306,6 @@ double Length::inInch(double text_width, double em_width) const
 }
 
 
-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
@@ -329,7 +313,7 @@ int Length::inBP() const
 
        double const text_width_in = 210.0 / 2.54; // assume A4
        double const em_width_in = 10.0 / 72.27;
-       double result = 72.0 * inInch(text_width_in, em_width_in);
+       double const result = 72.0 * inInch(text_width_in, em_width_in);
        return support::iround(result);
 }