Commit 2ad1a94d authored by Alexandre Julliard's avatar Alexandre Julliard

Backed out font codepage change.

parent 6cd85a58
......@@ -2993,10 +2993,6 @@ HFONT X11DRV_FONT_SelectObject( DC* dc, HFONT hfont, FONTOBJ* font )
hPrevFont = dc->w.hFont;
dc->w.hFont = hfont;
dc->w.codepage = CP_ACP;
/* NOTE: the codepage of UNICODE is treated as CP_ACP(=0) */
if ( CHECK_PFONT(physDev->font) )
dc->w.codepage = __PFONT(physDev->font)->fi->codepage;
LeaveCriticalSection( &crtsc_fonts_X11 );
......
......@@ -134,7 +134,6 @@ typedef struct
XFORM xformWorld2Vport; /* World-to-viewport transformation */
XFORM xformVport2World; /* Inverse of the above transformation */
BOOL vport2WorldValid; /* Is xformVport2World valid? */
WORD codepage; /* codepage of the selected font */
} WIN_DC_INFO;
......
......@@ -73,7 +73,6 @@ static void DC_Init_DC_INFO( WIN_DC_INFO *win_dc_info )
win_dc_info->xformWorld2Vport = win_dc_info->xformWorld2Wnd;
win_dc_info->xformVport2World = win_dc_info->xformWorld2Wnd;
win_dc_info->vport2WorldValid = TRUE;
win_dc_info->codepage = CP_ACP;
PATH_InitGdiPath(&win_dc_info->path);
}
......
......@@ -890,6 +890,7 @@ BOOL WINAPI GetTextExtentPoint32A( HDC hdc, LPCSTR str, INT count,
LPSIZE size )
{
BOOL ret = FALSE;
UINT codepage = CP_ACP; /* FIXME: get codepage of font charset */
DC * dc = DC_GetDCPtr( hdc );
if (!dc) return FALSE;
......@@ -899,11 +900,11 @@ BOOL WINAPI GetTextExtentPoint32A( HDC hdc, LPCSTR str, INT count,
/* str may not be 0 terminated so we can't use HEAP_strdupWtoA.
* So we use MultiByteToWideChar.
*/
UINT wlen = MultiByteToWideChar(dc->w.codepage,0,str,count,NULL,0);
UINT wlen = MultiByteToWideChar(codepage,0,str,count,NULL,0);
LPWSTR p = HeapAlloc( GetProcessHeap(), 0, wlen * sizeof(WCHAR) );
if (p)
{
wlen = MultiByteToWideChar(dc->w.codepage,0,str,count,p,wlen);
wlen = MultiByteToWideChar(codepage,0,str,count,p,wlen);
ret = dc->funcs->pGetTextExtentPoint( dc, p, wlen, size );
HeapFree( GetProcessHeap(), 0, p );
}
......
......@@ -54,6 +54,7 @@ BOOL WINAPI ExtTextOutA( HDC hdc, INT x, INT y, UINT flags,
{
DC * dc = DC_GetDCUpdate( hdc );
LPWSTR p;
UINT codepage = CP_ACP; /* FIXME: get codepage of font charset */
BOOL ret = FALSE;
LPINT lpDxW = NULL;
......@@ -61,7 +62,7 @@ BOOL WINAPI ExtTextOutA( HDC hdc, INT x, INT y, UINT flags,
if (dc->funcs->pExtTextOut)
{
UINT wlen = MultiByteToWideChar(dc->w.codepage,0,str,count,NULL,0);
UINT wlen = MultiByteToWideChar(codepage,0,str,count,NULL,0);
if (lpDx)
{
int i = 0, j = 0;
......@@ -69,7 +70,7 @@ BOOL WINAPI ExtTextOutA( HDC hdc, INT x, INT y, UINT flags,
lpDxW = (LPINT)HeapAlloc( GetProcessHeap(), 0, wlen*sizeof(INT));
while(i < count)
{
if(IsDBCSLeadByteEx(dc->w.codepage, str[i]))
if(IsDBCSLeadByteEx(codepage, str[i]))
{
lpDxW[j++] = lpDx[i] + lpDx[i+1];
i = i + 2;
......@@ -83,7 +84,7 @@ BOOL WINAPI ExtTextOutA( HDC hdc, INT x, INT y, UINT flags,
}
if ((p = HeapAlloc( GetProcessHeap(), 0, wlen * sizeof(WCHAR) )))
{
wlen = MultiByteToWideChar(dc->w.codepage,0,str,count,p,wlen);
wlen = MultiByteToWideChar(codepage,0,str,count,p,wlen);
ret = dc->funcs->pExtTextOut( dc, x, y, flags, lprect, p, wlen, lpDxW );
HeapFree( GetProcessHeap(), 0, p );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment