]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt/GuiFontMetrics.h
No need (any longer?) to create a new view for lyxfiles-open
[lyx.git] / src / frontends / qt / GuiFontMetrics.h
index 82c5839e21173a86c4f7effe951fa0be0ed1e5f7..5f73172c0d246f16c4c5b2a6ae7994fbca337800 100644 (file)
@@ -27,6 +27,8 @@
 namespace lyx {
 namespace frontend {
 
+struct TextLayoutHelper;
+
 struct BreakStringKey
 {
        bool operator==(BreakStringKey const & key) const {
@@ -97,20 +99,26 @@ public:
 
        /// 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_;