X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathChar.h;h=bc357bcadba16356afc1bf5a6e909109be785592;hb=a746aa52146257c0e7a2d60123f63dccad5b2751;hp=140c16829b7adc14d176d36710836bc39fa07aec;hpb=de6418f37765fe452f135f96dee6d49897bff215;p=lyx.git diff --git a/src/mathed/InsetMathChar.h b/src/mathed/InsetMathChar.h index 140c16829b..bc357bcadb 100644 --- a/src/mathed/InsetMathChar.h +++ b/src/mathed/InsetMathChar.h @@ -14,6 +14,7 @@ #include "InsetMath.h" +#include "Font.h" namespace lyx { @@ -23,7 +24,7 @@ public: /// explicit InsetMathChar(char_type c); /// - void metrics(MetricsInfo & mi, Dimension & dim) const; + bool metrics(MetricsInfo & mi, Dimension & dim) const; /// void draw(PainterInfo & pi, int x, int y) const; /// @@ -31,7 +32,7 @@ public: /// void drawT(TextPainter &, int x, int y) const; /// - int width() const { return width_; } + int kerning() const { return kerning_; } /// void write(WriteStream & os) const; @@ -49,11 +50,13 @@ public: bool isRelOp() const; private: - virtual std::auto_ptr doClone() const; + virtual std::auto_ptr doClone() const; /// the character char_type char_; - /// cached width - mutable int width_; + /// cached kerning for superscript + mutable int kerning_; + /// + mutable Font font_cache_; }; } // namespace lyx