* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author André Pönitz
+ * \author André Pönitz
*
* Full author contact details are available in file CREDITS.
*/
#include <config.h>
#include "InsetMathFont.h"
+
+#include "LaTeXFeatures.h"
#include "MathData.h"
#include "MathStream.h"
#include "MathParser.h"
-#include "LaTeXFeatures.h"
-#include "support/std_ostream.h"
+#include "MetricsInfo.h"
+
+#include <ostream>
namespace lyx {
}
-bool InsetMathFont::metrics(MetricsInfo & mi, Dimension & dim) const
+void InsetMathFont::metrics(MetricsInfo & mi, Dimension & dim) const
{
FontSetChanger dummy(mi.base, key_->name);
cell(0).metrics(mi, dim);
metricsMarkers(dim);
- if (dim_ == dim)
- return false;
- dim_ = dim;
- return true;
}
void InsetMathFont::metricsT(TextMetricsInfo const & mi, Dimension &) const
{
- cell(0).metricsT(mi, dim_);
+ // FIXME: BROKEN!
+ Dimension dim;
+ cell(0).metricsT(mi, dim);
}
// Fraktur used:
if (key_->name == "mathfrak" || key_->name == "mathbb")
features.require("amssymb");
- if (key_->name == "text")
- features.require("amsmath");
+ if (key_->name == "text" || key_->name == "textnormal"
+ || (key_->name.length() == 6 && key_->name.substr(0, 4) == "text"))
+ features.require("amstext");
if (key_->name == "textipa")
features.require("tipa");
}