mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Account for kerning when positioning scripts in the MathFontOld and
MathUnknown insets. * src/mathed/InsetMathUnknown.C (InsetMathUnknown::metrics): Cache kerning of last char. * src/mathed/InsetMathUnknown.h * src/mathed/InsetMathFontOld.h (InsetMathUnknown::kerning): New. Return cached kerning value. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17528 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c79381b9aa
commit
e53e4d0672
@ -43,6 +43,8 @@ public:
|
||||
void normalize(NormalStream &) const;
|
||||
///
|
||||
void infoize(odocstream & os) const;
|
||||
///
|
||||
int kerning() const { return cell(0).kerning(); }
|
||||
|
||||
private:
|
||||
virtual std::auto_ptr<InsetBase> doClone() const;
|
||||
|
@ -56,6 +56,8 @@ void InsetMathUnknown::normalize(NormalStream & os) const
|
||||
bool InsetMathUnknown::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
{
|
||||
mathed_string_dim(mi.base.font, name_, dim);
|
||||
docstring::const_reverse_iterator rit = name_.rbegin();
|
||||
kerning_ = mathed_char_kerning(mi.base.font, *rit);
|
||||
if (dim_ == dim)
|
||||
return false;
|
||||
dim_ = dim;
|
||||
|
@ -51,6 +51,8 @@ public:
|
||||
void finalize();
|
||||
///
|
||||
bool final() const;
|
||||
///
|
||||
int kerning() const { return kerning_; }
|
||||
private:
|
||||
virtual std::auto_ptr<InsetBase> doClone() const;
|
||||
///
|
||||
@ -59,6 +61,8 @@ private:
|
||||
bool final_;
|
||||
///
|
||||
bool black_;
|
||||
///
|
||||
mutable int kerning_;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user