mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
add per char ascent/descent
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5145 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b90722d753
commit
bd3ab1ba2b
@ -1,3 +1,7 @@
|
||||
2002-08-29 John Levon <levon@movementarian.org>
|
||||
|
||||
* qfont_metrics.C: add per char ascent/descent
|
||||
|
||||
2002-08-28 John Levon <levon@movementarian.org>
|
||||
|
||||
* QContentPane.C: fix cut-and-paste borkage from
|
||||
|
@ -45,18 +45,15 @@ int maxDescent(LyXFont const & f)
|
||||
|
||||
int ascent(char c, LyXFont const & f)
|
||||
{
|
||||
// FIXME - must do ascent for char not maxascent
|
||||
//QRect r = metrics(f).boundingRect(c);
|
||||
//lyxerr << r.x() << "," << r.y() <<
|
||||
// " : " << r.width() << "," << r.height() << endl;
|
||||
return metrics(f).ascent();
|
||||
QRect r = metrics(f).boundingRect(c);
|
||||
return abs(r.top());
|
||||
}
|
||||
|
||||
|
||||
int descent(char, LyXFont const & f)
|
||||
int descent(char c, LyXFont const & f)
|
||||
{
|
||||
// FIXME
|
||||
return metrics(f).descent();
|
||||
QRect r = metrics(f).boundingRect(c);
|
||||
return abs(r.bottom());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user