Re: [Fwd: Worsening of Win32 layout]

From: Stephen Viles (sviles_abi@iinet.net.au)
Date: Thu Sep 18 2003 - 12:37:50 EDT

  • Next message: Stephen Viles: "Re: [Fwd: Worsening of Win32 layout]"

    gr_Win32Graphics.cpp, lines 496-499:

    if(XAP_App::getApp()->theOSHasBidiSupport() == XAP_App::BIDI_SUPPORT_GUI)
            placementResult = GetCharacterPlacementW(m_hdc, (LPCWSTR) currentChars, iLength, 0, &gcpResult, 0);
    else
            placementResult = GetCharacterPlacementW(m_hdc, (LPCWSTR) currentChars, iLength, 0, &gcpResult, GCP_REORDER);

    Observations on my Windows 98SE platform:

    1. placementResult is always 0 after the call to GetCharacterPlacementW,
    indicating that GetCharacterPlacementW function has failed:
    http://msdn.microsoft.com/library/en-us/gdi/fontext_4l84.asp
    "Return Values
    If the function succeeds, the return value is the same as the return value
    from GetTextExtentPoint32, the width and height of the string in logical units.
    If the function fails, the return value is zero."

    2. Line 499 is executed. Forcing call of GetCharacterPlacementW with flags == 0 in line 497
    (by commenting out lines 496,498,499) still results in placementResult == 0.

    It may not be relevant, but I am a bit confused that the test in line 496 shows
    XAP_App::getApp()->theOSHasBidiSupport() != XAP_App::BIDI_SUPPORT_GUI
    and earlier test in line 477 shows XAP_App::getApp()->theOSHasBidiSupport()
    != XAP_App::BIDI_SUPPORT_NONE. XAP_Win32App::_setBidiOS appears to set
    only BIDI_SUPPORT_GUI or BIDI_SUPPORT_NONE. BIDI_SUPPORT_FULL is not set:

    Searching for: BIDI_SUPPORT_FULL
    af\xap\xp\xap_App.h(175): typedef enum {BIDI_SUPPORT_NONE, BIDI_SUPPORT_GUI, BIDI_SUPPORT_FULL} BidiSupportType;
    text\fmt\xp\fp_TextRun.cpp(105): s_bBidiOS = (XAP_App::getApp()->theOSHasBidiSupport() ==
    XAP_App::BIDI_SUPPORT_FULL);
    Found 2 occurrence(s) in 2 file(s)

    I can't find the actual value of XAP_App::getApp()->theOSHasBidiSupport()
    due to gdb problems ("Internal error: `this' is not an aggregate").

    Cheers - Stephen.

    19/09/03 12:11:40 AM, <msevior@physics.unimelb.edu.au> wrote:
    >
    >Oh well, maybe that little patch needs to be reverted.
    >
    >Anyone got other ideas? Maybe I did it wrong.
    >
    >Martin
    >
    >-------- Original Message --------
    >Subject: Worsening of Win32 layout
    >From: "Dr. Oliver Schurr" <schurro@rz.uni-potsdam.de>
    >Date: Thu, September 18, 2003 6:29 pm
    >To: Martin Sevior <msevior@physics.unimelb.edu.au>
    >
    >Dear Martin
    >
    >that little change to gr_Win32Graphics.cpp worsened the win32 layout,
    >inthat it returned to the ever-changing linebreaks upon ZOOOMING. Both
    >higher and lower level ZOOMING changes the linebreaks here.
    >
    >Thanks
    >Oliver



    This archive was generated by hypermail 2.1.4 : Thu Sep 18 2003 - 12:49:31 EDT