- Timestamp:
- May 7, 2004, 12:27:50 PM (21 years ago)
- Location:
- trunk/src/gdi32
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gdi32/ft2supp.cpp
r10403 r10600 262 262 263 263 DecreaseLogCount(); 264 if(GetTextMetricsW( hps, &tmW ) == TRUE) 264 if(GetTextMetricsW( hps, &tmW ) == TRUE) 265 265 { 266 266 pwidthHeight->y = tmW.tmHeight; // *Must* use the maximum height of the font … … 316 316 int len; 317 317 LPSTR astring; 318 LPINT lpDx = NULL; 318 319 319 320 pDCData pHps = (pDCData)OSLibGpiQueryDCData(hps); … … 323 324 lstrcpynWtoA(astring, pchString, len + 1 ); 324 325 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 325 341 ret = OSLibGpiCharStringPosAt(pHps,ptl,rct,flOptions,len,astring,alAdx); 342 343 if( lpDx ) 344 free( lpDx ); 345 326 346 free(astring); 347 327 348 return ret; 328 349 } -
trunk/src/gdi32/text.cpp
r10594 r10600 1 /* $Id: text.cpp,v 1.4 4 2004-04-30 13:27:19sandervl Exp $ */1 /* $Id: text.cpp,v 1.45 2004-05-07 10:27:50 sandervl Exp $ */ 2 2 3 3 /* … … 306 306 if(fUnicode) 307 307 hits = FT2Module.Ft2CharStringPosAtW(pHps->hps,&ptl,&pmRect,flOptions,cbCount,lpszStringW,lpDx, fuOptions & ETO_GLYPH_INDEX); 308 else hits = FT2Module.Ft2CharStringPosAtA(pHps->hps,&ptl,&pmRect,flOptions,cbCount,lpszStringA,lpDx, fuOptions & ETO_GLYPH_INDEX); 308 else 309 { 310 INT *lpDxNew = NULL; 311 312 // KOMH : OS/2 uses width of lead byte for whole DBCS width and is not concerned about 313 // trail byte, while Win can apportion width between lead byte and trail byte 314 if( IsDBCSEnv() && lpDx ) 315 { 316 int i; 317 318 lpDxNew = ( INT * )malloc(( cbCount + 1 ) * sizeof( INT )); // 1 for broken DBCS char 319 for( i = 0; i < cbCount; i++ ) 320 { 321 lpDxNew[ i ] = lpDx[ i ]; 322 if( IsDBCSLeadByte( lpszStringA[ i ] )) 323 { 324 lpDxNew[ i ] += lpDx[ i + 1 ]; 325 lpDxNew[ ++i ] = 0; // for the sake of possibility 326 } 327 } 328 329 lpDx = lpDxNew; 330 } 331 332 hits = FT2Module.Ft2CharStringPosAtA(pHps->hps,&ptl,&pmRect,flOptions,cbCount,lpszStringA,lpDx, fuOptions & ETO_GLYPH_INDEX); 333 334 if( lpDxNew ) 335 free( lpDxNew ); 336 } 309 337 310 338 if (lprc && ((align & 0x18) == TA_BASELINE)) … … 356 384 } 357 385 } 386 358 387 rc = InternalTextOutAW(hdc, X, Y, fuOptions, lprc, lpszString, NULL, cbCount, lpDx, TRUE, FALSE); 359 388
Note:
See TracChangeset
for help on using the changeset viewer.