Changeset 288:af37dd280317

Show
Ignore:
Timestamp:
08/21/08 10:08:55 (3 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Fix: set SCRIPT_CACHE to zero

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/graphics/TextLayout.d

    r287 r288  
    29002900    bool useCMAPcheck = !sp.fComplex && !run.analysis.fNoGlyphIndex; 
    29012901    if (useCMAPcheck) { 
    2902         ushort[] glyphs = new ushort[wchars.length]; 
     2902        scope ushort[] glyphs = new ushort[wchars.length]; 
    29032903        if (OS.ScriptGetCMap(hdc, run.psc, wchars.ptr, wchars.length, 0, glyphs.ptr) !is OS.S_OK) { 
    29042904            if (run.psc !is null) { 
     
    29062906                glyphCount[0] = 0; 
    29072907                int[1] one = 1; 
    2908         //        OS.MoveMemory( run.psc, one.ptr, (void*).sizeof ); 
    2909         // DWT: FIXME This should be checked, it works in Java with the MoveMemory 
     2908                *cast(int*)run.psc = 0; 
    29102909            } 
    29112910            return false; 
    29122911        } 
    2913         //delete glyphs; 
    29142912    } 
    29152913    auto hr = OS.ScriptShape(hdc, run.psc, wchars.ptr, wchars.length, maxGlyphs, &run.analysis, run.glyphs, run.clusters, run.visAttrs, glyphCount.ptr); 
     
    29322930        OS.ScriptFreeCache(run.psc); 
    29332931        glyphCount[0] = 0; 
    2934         int[1] one = 1; 
    2935         OS.MoveMemory( run.psc, one.ptr, (void*).sizeof ); 
     2932        *cast(int*)run.psc = 0; 
    29362933    } 
    29372934    run.glyphCount = 0;