]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetFormulaMacro.C
This commit cleans up everything related to singleton. The other important change...
[lyx.git] / src / mathed / InsetFormulaMacro.C
index 4544151305ef600cc72bf01345b5eae752966192..ea9076f75f8faf1369c668c8e7b4b617c4db6bde 100644 (file)
@@ -24,8 +24,8 @@
 #include "lyxlex.h"
 #include "outputparams.h"
 
+#include "frontends/FontMetrics.h"
 #include "frontends/Painter.h"
-#include "frontends/font_metrics.h"
 
 #include "support/lstrings.h"
 
@@ -127,7 +127,7 @@ void InsetFormulaMacro::metrics(MetricsInfo & mi, Dimension & dim) const
        tmpl()->metrics(mi, dim);
        dim.asc += 5;
        dim.des += 5;
-       dim.wid += 10 + font_metrics::width(prefix(), mi.base.font);
+       dim.wid += 10 + theFontMetrics(mi.base.font).width(prefix());
        dim_ = dim;
 }
 
@@ -162,7 +162,9 @@ void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const
        pi.pain.text(x + 2, y, prefix(), font);
 
        // body
-       tmpl()->draw(pi, x + font_metrics::width(prefix(), p.base.font) + 5, y);
+       tmpl()->draw(pi,
+               x + theFontMetrics(p.base.font).width(prefix()) + 5,
+               y);
 
        setPosCache(pi, x, y);
 }