mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 21:45:24 +00:00
fix font metrics with Qt/Win 3.2.1nc
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_3_X@9456 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
21094469a5
commit
728ca80a92
@ -1,3 +1,8 @@
|
||||
2005-01-07 Ruurd Reitsma <rareitsma@yahoo.com>
|
||||
|
||||
* qfont_metrics.C (ascent, descent): correct the metrics returned
|
||||
by Qt/Win 3.2.1 non-commercial edition.
|
||||
|
||||
2005-01-05 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* QGraphics.C: remove unnecessary "#include support/FileInfo.h".
|
||||
|
@ -64,7 +64,14 @@ int ascent(char c, LyXFont const & f)
|
||||
if (!lyxrc.use_gui)
|
||||
return 1;
|
||||
QRect const & r = metrics(f).boundingRect(c);
|
||||
// Qt/Win 3.2.1nc (at least) corrects the GetGlyphOutlineA|W y
|
||||
// value by the height: (x, -y-height, width, height).
|
||||
// Other versions return: (x, -y, width, height)
|
||||
#if defined(Q_WS_WIN) && (QT_VERSION == 0x030201)
|
||||
return -(r.top() + r.height());
|
||||
#else
|
||||
return -r.top();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -73,7 +80,14 @@ int descent(char c, LyXFont const & f)
|
||||
if (!lyxrc.use_gui)
|
||||
return 1;
|
||||
QRect const & r = metrics(f).boundingRect(c);
|
||||
return r.bottom()+1;
|
||||
// Qt/Win 3.2.1nc (at least) corrects the GetGlyphOutlineA|W y
|
||||
// value by the height: (x, -y-height, width, height).
|
||||
// Other versions return: (x, -y, width, height)
|
||||
#if defined(Q_WS_WIN) && (QT_VERSION == 0x030201)
|
||||
return r.bottom() + r.height() + 1;
|
||||
#else
|
||||
return r.bottom() + 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -62,6 +62,8 @@ What's new
|
||||
|
||||
- Fix math fonts display in LyX/Mac.
|
||||
|
||||
- fix font metrics problems with Qt/Win 3.2.1
|
||||
|
||||
- Fix bindings for depth-increment/decrement for LyX/Mac.
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user