diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 1681a7c392..b586c03529 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2002-09-07 John Levon + + * qfont_metrics.C: revert accurate per-char metrics + because LyX is broken + 2002-09-07 John Levon * qfont_loader.h: diff --git a/src/frontends/qt2/qfont_metrics.C b/src/frontends/qt2/qfont_metrics.C index 8d6f0000d2..9853d8f432 100644 --- a/src/frontends/qt2/qfont_metrics.C +++ b/src/frontends/qt2/qfont_metrics.C @@ -43,17 +43,29 @@ int maxDescent(LyXFont const & f) } -int ascent(char c, LyXFont const & f) +int ascent(char /*c*/, LyXFont const & f) { +// LyX is broken - returning accurate metrics breaks mathed +// because the cursor extends outside of its region. +// http://marc.theaimsgroup.com/?l=lyx-devel&m=103060206211300&w=2 +#if 0 QRect r = metrics(f).boundingRect(c); return abs(r.top()); +#endif + return metrics(f).ascent(); } -int descent(char c, LyXFont const & f) +int descent(char /*c*/, LyXFont const & f) { +// LyX is broken - returning accurate metrics breaks mathed +// because the cursor extends outside of its region. +// http://marc.theaimsgroup.com/?l=lyx-devel&m=103060206211300&w=2 +#if 0 QRect r = metrics(f).boundingRect(c); return abs(r.bottom()); +#endif + return metrics(f).descent(); }