]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathChar.C
This commit saves the need to check for lyx::use_gui in a number of places.
[lyx.git] / src / mathed / InsetMathChar.C
index edec8c43d08d829828d9cefd450c221e37d63fd9..9307a721eef5ca4e48e7d27a0f4f0c53afe42647 100644 (file)
@@ -20,6 +20,8 @@
 #include "support/lstrings.h"
 #include "TextPainter.h"
 
+#include "frontends/FontMetrics.h"
+
 using std::auto_ptr;
 
 extern bool has_math_fonts;
@@ -76,7 +78,7 @@ void InsetMathChar::metrics(MetricsInfo & mi, Dimension & dim) const
        whichFont(font_, code_, mi);
        mathed_char_dim(font_, char_, dim_);
        if (isBinaryOp(char_, code_))
-               width_ += 2 * font_metrics::width(' ', font_);
+               width_ += 2 * theFontMetrics(font_).width(' ');
        lyxerr << "InsetMathChar::metrics: " << dim << endl;
 #endif
        width_ = dim.wid;