#ifndef FONT_METRICS_H
#define FONT_METRICS_H
+
+#include "support/mute_warning.h"
#include "support/strfwd.h"
#include <vector>
// The places where to break a string and the width of the resulting lines.
struct Break {
- Break(int l, int w) : len(l), wid(w) {}
+ Break(int l, int w, int nsw) : len(l), wid(w), nspc_wid(nsw) {}
+ // Number of characters
int len = 0;
+ // text width
int wid = 0;
+ // text width when trailing spaces are removed; only makes a
+ // difference for the last break.
+ int nspc_wid = 0;
};
typedef std::vector<Break> Breaks;
/**
int & width,
int & ascent,
int & descent) const = 0;
-
- /// return the number of expanding characters taken into account for
- /// increased inter-word spacing during justification
- virtual int countExpanders(docstring const & str) const = 0;
};
class FontInfo;
/// Implementation is in Application.cpp
+
+LYX_BEGIN_MUTE_GCC_WARNING(dangling-reference)
frontend::FontMetrics const & theFontMetrics(Font const & f);
frontend::FontMetrics const & theFontMetrics(FontInfo const & fi);
+LYX_END_MUTE_GCC_WARNING
+
} // namespace lyx