Move DCFuncs ExtTextOut and GetTextExtentPoint to Unicode.
Map a few Unicode chars to the first 0xff in psdrv.
Don't expect x11drv to display Unicode chars yet.
diff --git a/objects/text.c b/objects/text.c
index 3c4714b..36b0624 100644
--- a/objects/text.c
+++ b/objects/text.c
@@ -374,29 +374,33 @@
/***********************************************************************
- * ExtTextOut32A (GDI32.98)
+ * ExtTextOutA (GDI32.98)
*/
BOOL WINAPI ExtTextOutA( HDC hdc, INT x, INT y, UINT flags,
const RECT *lprect, LPCSTR str, UINT count,
const INT *lpDx )
{
- DC * dc = DC_GetDCPtr( hdc );
- return dc && dc->funcs->pExtTextOut &&
- dc->funcs->pExtTextOut(dc,x,y,flags,lprect,str,count,lpDx);
+ /* str need not be \0 terminated but lstrcpynAtoW adds \0 so we allocate one
+ more byte */
+ LPWSTR p = HeapAlloc( GetProcessHeap(), 0, (count+1) * sizeof(WCHAR) );
+ INT ret;
+ lstrcpynAtoW( p, str, count+1 );
+ ret = ExtTextOutW( hdc, x, y, flags, lprect, p, count, lpDx );
+ HeapFree( GetProcessHeap(), 0, p );
+ return ret;
}
/***********************************************************************
- * ExtTextOut32W (GDI32.99)
+ * ExtTextOutW (GDI32.99)
*/
BOOL WINAPI ExtTextOutW( HDC hdc, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR str, UINT count,
const INT *lpDx )
{
- LPSTR p = HEAP_strdupWtoA( GetProcessHeap(), 0, str );
- INT ret = ExtTextOutA( hdc, x, y, flags, lprect, p, count, lpDx );
- HeapFree( GetProcessHeap(), 0, p );
- return ret;
+ DC * dc = DC_GetDCPtr( hdc );
+ return dc && dc->funcs->pExtTextOut &&
+ dc->funcs->pExtTextOut(dc,x,y,flags,lprect,str,count,lpDx);
}