mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
fix rbearing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5302 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9da553ebf9
commit
e850a69bf1
@ -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
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user