"Jean-Marc Lasgouttes" <[EMAIL PROTECTED]>
wrote in message news:[EMAIL PROTECTED]
> >>>>> "Ruurd" == Ruurd Reitsma
<[EMAIL PROTECTED]> writes:
> Hmm, these values seem very weird to me... I cannot understand how qt
> 3.2.1 could have been sooo broken.
>

Some reverse engineering reveils that the height is substracted from the y
value.

Weird....

Ruurd

-------------------------------------------------

 $ diff -u qfont_metrics.C lyx-1.3.5/src/frontends/qt2/qfont_metrics.C
--- qfont_metrics.C     2003-02-14 12:22:48.000000000 +0100
+++ lyx-1.3.5/src/frontends/qt2/qfont_metrics.C 2005-01-06
21:25:33.821017600 +0100
@@ -68,7 +68,14 @@
        if (!lyxrc.use_gui)
                return 1;
        QRect const & r = metrics(f).boundingRect(c);
+       // Qt-Win 3.2.1 corrects the GetGlyphOutlineA|W y value by the
height
+       // (x,-y-height,width,height)
+       // other Win versions have (x,-y,width,height)
+#if defined(Q_WS_WIN) && (QT_VERSION == 0x030201)
+       return -(r.top()+r.height());
+#else
        return -r.top();
+#endif
 }


@@ -77,7 +84,11 @@
        if (!lyxrc.use_gui)
                return 1;
        QRect const & r = metrics(f).boundingRect(c);
+#if defined(Q_WS_WIN) && (QT_VERSION == 0x030201)
+       return r.bottom()+r.height()+1;
+#else
        return r.bottom()+1;
+#endif
 }



Reply via email to