#include "gettext.h"
#include "Language.h"
#include "LaTeXFeatures.h"
+#include "Layout.h"
#include "Font.h"
#include "LyXRC.h"
#include "Row.h"
#include "OutputParams.h"
#include "paragraph_funcs.h"
#include "sgml.h"
+#include "TextClass.h"
#include "TexRow.h"
#include "VSpace.h"
int ParagraphMetrics::singleWidth(pos_type pos, Font const & font) const
{
- char_type c = par_->getChar(pos);
-
// The most special cases are handled first.
- if (c == Paragraph::META_INSET)
+ if (par_->isInset(pos))
return insetDimension(par_->getInset(pos)).wid;
+ char_type c = par_->getChar(pos);
+
if (!isPrintable(c))
return theFontMetrics(font).width(c);