fix rbearing

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5302 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2002-09-14 04:50:38 +00:00
parent 9da553ebf9
commit e850a69bf1
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2002-09-14 John Levon <levon@movementarian.org>
* qfont_metrics.C: fix rbearing()
2002-09-14 John Levon <levon@movementarian.org>
* QLPainter.C: fix arc

View File

@ -59,13 +59,17 @@ int descent(char c, LyXFont const & f)
int lbearing(char c, LyXFont const & f)
{
lyxerr << "lb of " << c << " is " << metrics(f).leftBearing(c) << endl;
return metrics(f).leftBearing(c);
}
int rbearing(char c, LyXFont const & f)
{
return metrics(f).rightBearing(c);
QFontMetrics const & m(metrics(f));
// Qt rbearing is from the right edge of the char's width().
return (m.width(c) - m.rightBearing(c));
}