std::string const asLatexString() const;
/// return the on-screen size of this length
int inPixels(int text_width, int em_width = 0) const;
- /// return the on-screen size of this length of an image
+ /// return the value in Big Postscript points.
int inBP() const;
friend bool isValidLength(std::string const & data, Length * result);
#include "FuncRequest.h"
#include "frontends/Clipboard.h"
+#include "frontends/FontMetrics.h"
#include "frontends/Painter.h"
#include "support/debug.h"
-int InsetMathGrid::RowInfo::skipPixels() const
+int InsetMathGrid::RowInfo::skipPixels(MetricsInfo const & mi) const
{
- return crskip_.inBP();
+ frontend::FontMetrics const & fm = theFontMetrics(mi.base.font);
+ return crskip_.inPixels(mi.base.textwidth,
+ fm.width(char_type('M')));
}
rowinfo_[row].offset_ =
rowinfo_[row - 1].offset_ +
rowinfo_[row - 1].descent_ +
- rowinfo_[row - 1].skipPixels() +
+ rowinfo_[row - 1].skipPixels(mi) +
rowsep() +
rowinfo_[row].lines_ * hlinesep() +
rowinfo_[row].ascent_;
rowinfo_[row].offset_ =
rowinfo_[row - 1].offset_ +
rowinfo_[row - 1].descent_ +
- //rowinfo_[row - 1].skipPixels() +
+ //rowinfo_[row - 1].skipPixels(mi) +
1 + //rowsep() +
//rowinfo_[row].lines_ * hlinesep() +
rowinfo_[row].ascent_;