18 UNICODE_STRING StringU
;
23 RtlInitAnsiString(&StringA
, (LPSTR
)lpString
);
24 RtlAnsiStringToUnicodeString(&StringU
, &StringA
, TRUE
);
26 StringU
.Buffer
= NULL
;
28 ret
= TextOutW(hdc
, nXStart
, nYStart
, StringU
.Buffer
, cbString
);
29 RtlFreeUnicodeString(&StringU
);
46 return NtGdiExtTextOut(hdc
, nXStart
, nYStart
, 0, NULL
, lpString
, cbString
, NULL
);
55 GetTextCharacterExtra(
62 if (!GdiGetHandleUserData((HGDIOBJ
) hDc
, (PVOID
) &Dc_Attr
)) return 0;
63 return Dc_Attr
->lTextExtra
;
65 // Do it this way for now.
66 return GetDCDWord( hDc
, GdiGetTextCharExtra
, 0);
79 /* MSDN docs say this is equivalent */
80 return GetTextCharsetInfo(hdc
, NULL
, 0);
91 LPFONTSIGNATURE lpSig
,
95 return NtGdiGetTextCharsetInfo(hdc
, lpSig
, dwFlags
);
111 if (! NtGdiGetTextMetricsW(hdc
, &tmwi
, sizeof(TMW_INTERNAL
)))
116 return TextMetricW2A(lptm
, &tmwi
.TextMetric
);
132 if (! NtGdiGetTextMetricsW(hdc
, &tmwi
, sizeof(TMW_INTERNAL
)))
137 *lptm
= tmwi
.TextMetric
;
155 UNICODE_STRING StringU
;
158 RtlInitAnsiString(&StringA
, (LPSTR
)lpString
);
159 RtlAnsiStringToUnicodeString(&StringU
, &StringA
, TRUE
);
161 ret
= GetTextExtentPointW(hdc
, StringU
.Buffer
, cbString
, lpSize
);
163 RtlFreeUnicodeString(&StringU
);
181 return NtGdiGetTextExtent(hdc
, (LPWSTR
)lpString
, cbString
, lpSize
, 0);
190 GetTextExtentExPointW(
200 return NtGdiGetTextExtentExW (
201 hdc
, (LPWSTR
)lpszStr
, cchString
, nMaxExtent
, (PULONG
)lpnFit
, (PULONG
)alpDx
, lpSize
, 0 );
210 GetTextExtentExPointA(
224 Status
= HEAP_strdupA2W ( &lpszStrW
, lpszStr
);
225 if (!NT_SUCCESS (Status
))
226 SetLastError (RtlNtStatusToDosError(Status
));
229 rc
= NtGdiGetTextExtentExW (
230 hdc
, lpszStrW
, cchString
, nMaxExtent
, (PULONG
)lpnFit
, (PULONG
)alpDx
, lpSize
, 0 );
232 HEAP_free ( lpszStrW
);
244 GetTextExtentPoint32A(
252 UNICODE_STRING StringU
;
255 RtlInitAnsiString(&StringA
, (LPSTR
)lpString
);
256 RtlAnsiStringToUnicodeString(&StringU
, &StringA
, TRUE
);
258 ret
= GetTextExtentPoint32W(hdc
, StringU
.Buffer
, cbString
, lpSize
);
260 RtlFreeUnicodeString(&StringU
);
271 GetTextExtentPoint32W(
278 return NtGdiGetTextExtentPoint32(hdc
, lpString
, cbString
, lpSize
);
299 UNICODE_STRING StringU
;
302 RtlInitAnsiString(&StringA
, (LPSTR
)lpString
);
303 RtlAnsiStringToUnicodeString(&StringU
, &StringA
, TRUE
);
305 ret
= ExtTextOutW(hdc
, X
, Y
, fuOptions
, lprc
, StringU
.Buffer
, cbCount
, lpDx
);
307 RtlFreeUnicodeString(&StringU
);
329 return NtGdiExtTextOut(hdc
, X
, Y
, fuOptions
, lprc
, lpString
, cbCount
, lpDx
);
344 return NtGdiGetTextFaceW(hDC
, nCount
, lpFaceName
, FALSE
);
353 GetTextFaceA( HDC hdc
, INT count
, LPSTR name
)
355 INT res
= GetTextFaceW(hdc
, 0, NULL
);
356 LPWSTR nameW
= HeapAlloc( GetProcessHeap(), 0, res
* 2 );
357 GetTextFaceW( hdc
, res
, nameW
);
361 if (count
&& !WideCharToMultiByte( CP_ACP
, 0, nameW
, -1, name
, count
, NULL
, NULL
))
366 res
= WideCharToMultiByte( CP_ACP
, 0, nameW
, -1, NULL
, 0, NULL
, NULL
);
367 HeapFree( GetProcessHeap(), 0, nameW
);
373 GetFontResourceInfoW(
381 UNICODE_STRING NtFileName
;
383 if (!lpFileName
|| !pdwBufSize
|| !lpBuffer
)
385 SetLastError(ERROR_INVALID_PARAMETER
);
389 if (!RtlDosPathNameToNtPathName_U(lpFileName
,
394 SetLastError(ERROR_PATH_NOT_FOUND
);
398 bRet
= NtGdiGetFontResourceInfoInternalW(
407 RtlFreeHeap(RtlGetProcessHeap(), 0, NtFileName
.Buffer
);
423 SetTextCharacterExtra(
428 INT cExtra
= 0x80000000;
431 if (CharExtra
== cExtra
)
433 SetLastError(ERROR_INVALID_PARAMETER
);
437 if (GDI_HANDLE_GET_TYPE(hDC
) == GDI_OBJECT_TYPE_METADC
)
439 return MFDRV_SetTextCharacterExtra( hDC
, CharExtra
); // Wine port.
441 if (!GdiGetHandleUserData((HGDIOBJ
) hDC
, (PVOID
) &Dc_Attr
)) return cExtra
;
443 if (NtCurrentTeb()->GdiTebBatch
.HDC
== hDC
)
445 if (Dc_Attr
->ulDirty_
& DC_FONTTEXT_DIRTY
)
447 NtGdiFlush(); // Sync up Dc_Attr from Kernel space.
448 Dc_Attr
->ulDirty_
&= ~(DC_MODE_DIRTY
|DC_FONTTEXT_DIRTY
);
451 cExtra
= Dc_Attr
->lTextExtra
;
452 Dc_Attr
->lTextExtra
= CharExtra
;
456 return GetAndSetDCDWord( hDC
, GdiGetSetTextCharExtra
, CharExtra
, 0, 0, 0 );