namespace lyx {
namespace frontend {
+struct TextLayoutHelper;
+
struct BreakStringKey
{
bool operator==(BreakStringKey const & key) const {
/// Return a pointer to a cached QTextLayout object
std::shared_ptr<QTextLayout const>
- getTextLayout(docstring const & s, bool const rtl,
- double const wordspacing) const;
+ getTextLayout(docstring const & s, bool const rtl, double const wordspacing) const;
private:
Breaks breakString_helper(docstring const & s, int first_wid, int wid,
bool rtl, bool force) const;
+ /// A different version of getTextLayout for internal use
+ std::shared_ptr<QTextLayout const>
+ getTextLayout(TextLayoutHelper const & tlh, double const wordspacing) const;
+
/// The font
QFont font_;
/// Metrics on the font
QFontMetrics metrics_;
+ /// Height of character "x"
+ int xheight_;
+
/// Slope of italic font
double slope_;