Re: patch: Proposed patch for gr_Graphics.cpp

From: Dom Lachowicz (domlachowicz_at_yahoo.com)
Date: Tue Dec 30 2003 - 10:18:44 EST

  • Next message: Jordi Mas: "Re: commit: Fix 6143"

    Hi Jordi,

    I believe that your proposed behavior is correct.
    Please commit your patch to both HEAD and STABLE.

    Thanks,
    Dom

    --- Jordi Mas <jmas_at_softcatala.org> wrote:
    > Hello,
    >
    > I propose the following patch for gr_Graphics.cpp
    >
    >
    ;-------------------------------------------------------------------
    >
    > --- xp/gr_Graphics.cpp 10 Oct 2003 13:34:37 -0000
    > 1.89.2.1
    > +++ xp/gr_Graphics.cpp 30 Dec 2003 09:02:51 -0000
    > @@ -233,7 +233,7 @@
    > {
    > charWidth =
    > measureUnRemappedChar(currentChar);
    >
    > - if(charWidth ==
    > GR_CW_UNKNOWN)
    > + if(charWidth ==
    > GR_CW_UNKNOWN ||charWidth ==GR_CW_ABSENT
    > )
    > charWidth = 0;
    > else
    > if(UT_isOverstrikingChar(currentChar) != UT_NOT_OVE
    > RSTRIKING && charWidth > 0)
    > charWidth =
    > -charWidth;
    >
    ;-------------------------------------------------------------------
    >
    > Under Win32 measureUnRemappedChar can return
    > GR_CW_ABSENT (0x80808081).
    > Because we only test for GR_CW_UNKNOWN, charWidth
    > can get the value
    > 0x80808081 that is wrong is taken as a real witdh. I
    > have not seen any bad
    > behaviour because of this, but for is clearly wrong.
    > If you agree, I apply the
    > patch. I prefer to ask, since I'm not familiar with
    > this code.
    >
    > Thanks,
    >
    > --
    >
    > Jordi Mas i Hernāndez (homepage
    > http://www.softcatala.org/~jmas)
    > http://www.softcatala.org
    >
    >
    >
    >
    > > ? patch.txt
    > ? win/diff.txt
    > Index: xp/gr_Graphics.cpp
    >
    ===================================================================
    > RCS file:
    > /cvsroot/abi/src/af/gr/xp/gr_Graphics.cpp,v
    > retrieving revision 1.89.2.1
    > diff -u -r1.89.2.1 gr_Graphics.cpp
    > --- xp/gr_Graphics.cpp 10 Oct 2003 13:34:37 -0000
    > 1.89.2.1
    > +++ xp/gr_Graphics.cpp 30 Dec 2003 09:02:51 -0000
    > @@ -233,7 +233,7 @@
    > {
    > charWidth = measureUnRemappedChar(currentChar);
    >
    > - if(charWidth == GR_CW_UNKNOWN)
    > + if(charWidth == GR_CW_UNKNOWN ||charWidth
    > ==GR_CW_ABSENT)
    > charWidth = 0;
    > else if(UT_isOverstrikingChar(currentChar) !=
    > UT_NOT_OVERSTRIKING && charWidth > 0)
    > charWidth = -charWidth;
    >
    >

    __________________________________
    Do you Yahoo!?
    Protect your identity with Yahoo! Mail AddressGuard
    http://antispam.yahoo.com/whatsnewfree



    This archive was generated by hypermail 2.1.4 : Tue Dec 30 2003 - 10:17:22 EST