Ignore:
Timestamp:
May 7, 2004, 12:27:50 PM (21 years ago)
Author:
sandervl
Message:

KOM: DBCS updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/ft2supp.cpp

    r10403 r10600  
    262262
    263263        DecreaseLogCount();
    264         if(GetTextMetricsW( hps, &tmW ) == TRUE) 
     264        if(GetTextMetricsW( hps, &tmW ) == TRUE)
    265265        {
    266266            pwidthHeight->y = tmW.tmHeight;    // *Must* use the maximum height of the font
     
    316316    int   len;
    317317    LPSTR astring;
     318    LPINT lpDx = NULL;
    318319
    319320    pDCData pHps = (pDCData)OSLibGpiQueryDCData(hps);
     
    323324    lstrcpynWtoA(astring, pchString, len + 1 );
    324325
     326    if( IsDBCSEnv() && alAdx )
     327    {
     328        int i, j;
     329
     330        lpDx = ( LPINT )malloc( len * sizeof( INT ));
     331        for( i = j = 0; i < len; i++, j++ )
     332        {
     333            lpDx[ i ] = alAdx[ j ];
     334            if( IsDBCSLeadByte( astring[ i ]))
     335                lpDx[ ++i ] = 0;
     336        }
     337
     338        alAdx = ( CONST INT * )lpDx;
     339    }
     340
    325341    ret = OSLibGpiCharStringPosAt(pHps,ptl,rct,flOptions,len,astring,alAdx);
     342
     343    if( lpDx )
     344        free( lpDx );
     345
    326346    free(astring);
     347
    327348    return ret;
    328349}
Note: See TracChangeset for help on using the changeset viewer.