revert accurate per-char metrics

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5224 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2002-09-07 20:00:39 +00:00
parent 2b1dc110bc
commit 6d6af0efa9
2 changed files with 19 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2002-09-07 John Levon <levon@movementarian.org>
* qfont_metrics.C: revert accurate per-char metrics
because LyX is broken
2002-09-07 John Levon <levon@movementarian.org>
* qfont_loader.h:

View File

@ -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();
}