ReactOS  0.4.15-dev-1184-g23e04ae
text.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS win32 kernel mode subsystem
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: win32ss/gdi/ntgdi/text.c
5  * PURPOSE: Text/Font
6  * PROGRAMMER:
7  */
8 
11 #include <win32k.h>
12 
13 #define NDEBUG
14 #include <debug.h>
15 
16 
17 /*
18  This is a hack. See CORE-1091.
19 
20  It is needed because ReactOS does not support raster fonts now.
21  After Raster Font support is added, then it can be removed.
22  Find the current font's logfont for testing its lf.lfFaceName.
23 
24  The ftGdiGetTextMetricsW function currently in ReactOS will always return a Truetype font
25  because we cannot yet handle raster fonts. So it will return flags
26  TMPF_VECTOR and TMPF_TRUETYPE, which can cause problems in edit boxes.
27  */
28 
31  HDC hDC,
32  TMW_INTERNAL *ptm)
33 {
34  LOGFONTW lf;
35  HFONT hCurrentFont;
36 
37  hCurrentFont = NtGdiGetDCObject(hDC, GDI_OBJECT_TYPE_FONT);
38  GreGetObject(hCurrentFont, sizeof(LOGFONTW), &lf);
39 
40  /* To compensate for the GetTextMetricsW call changing the PitchAndFamily
41  * to a TrueType one when we have a 'Raster' font as our input we filter
42  * out the problematic TrueType and Vector bits.
43  * Our list below checks for Raster Font Facenames. */
44  DPRINT("Font Facename is '%S'.\n", lf.lfFaceName);
45  if ((wcsicmp(lf.lfFaceName, L"Helv") == 0) ||
46  (wcsicmp(lf.lfFaceName, L"Courier") == 0) ||
47  (wcsicmp(lf.lfFaceName, L"MS Sans Serif") == 0) ||
48  (wcsicmp(lf.lfFaceName, L"MS Serif") == 0) ||
49  (wcsicmp(lf.lfFaceName, L"Times New Roman") == 0) ||
50  (wcsicmp(lf.lfFaceName, L"MS Shell Dlg") == 0) ||
51  (wcsicmp(lf.lfFaceName, L"System") == 0) ||
52  (wcsicmp(lf.lfFaceName, L"Terminal") == 0))
53  {
55  }
56 }
57 
62  HDC hdc,
63  int nXStart,
64  int nYStart,
65  LPCWSTR lpString,
66  int cchString)
67 {
68  return GreExtTextOutW(hdc, nXStart, nYStart, 0, NULL, lpString, cchString, NULL, 0);
69 }
70 
71 /*
72  flOpts :
73  GetTextExtentPoint32W = 0
74  GetTextExtentPointW = 1
75  */
76 BOOL
79  HDC hDC,
80  LPCWSTR lpwsz,
81  INT cwc,
82  LPSIZE psize,
83  UINT flOpts)
84 {
85  PDC pdc;
86  PDC_ATTR pdcattr;
87  BOOL Result;
88  PTEXTOBJ TextObj;
89 
90  if (!cwc)
91  {
92  psize->cx = 0;
93  psize->cy = 0;
94  return TRUE;
95  }
96 
97  pdc = DC_LockDc(hDC);
98  if (!pdc)
99  {
101  return FALSE;
102  }
103 
104  pdcattr = pdc->pdcattr;
105 
106  TextObj = RealizeFontInit(pdcattr->hlfntNew);
107  if ( TextObj )
108  {
110  TextObj,
111  lpwsz,
112  cwc,
113  0,
114  NULL,
115  0,
116  psize,
117  flOpts);
118  TEXTOBJ_UnlockText(TextObj);
119  }
120  else
121  Result = FALSE;
122 
123  DC_UnlockDc(pdc);
124  return Result;
125 }
126 
127 
128 /*
129  fl :
130  GetTextExtentExPointW = 0 and everything else that uses this.
131  GetTextExtentExPointI = 1
132  */
133 BOOL
134 FASTCALL
136  HDC hDC,
137  LPCWSTR String,
138  ULONG Count,
139  ULONG MaxExtent,
140  PULONG Fit,
141  PULONG Dx,
142  LPSIZE pSize,
143  FLONG fl)
144 {
145  PDC pdc;
146  PDC_ATTR pdcattr;
147  BOOL Result;
148  PTEXTOBJ TextObj;
149 
150  if ( (!String && Count ) || !pSize )
151  {
153  return FALSE;
154  }
155 
156  if ( !Count )
157  {
158  if ( Fit ) Fit = 0;
159  return TRUE;
160  }
161 
162  pdc = DC_LockDc(hDC);
163  if (NULL == pdc)
164  {
166  return FALSE;
167  }
168  pdcattr = pdc->pdcattr;
169 
170  TextObj = RealizeFontInit(pdcattr->hlfntNew);
171  if ( TextObj )
172  {
174  TextObj,
175  String,
176  Count,
177  MaxExtent,
178  (LPINT)Fit,
179  (LPINT)Dx,
180  pSize,
181  fl);
182  TEXTOBJ_UnlockText(TextObj);
183  }
184  else
185  Result = FALSE;
186 
187  DC_UnlockDc(pdc);
188  return Result;
189 }
190 
191 BOOL
192 WINAPI
194  _In_ HDC hdc,
196 {
197  TMW_INTERNAL tmwi;
198  if (!ftGdiGetTextMetricsW(hdc, &tmwi)) return FALSE;
199  IntTMWFixUp(hdc, &tmwi);
200  *lptm = tmwi.TextMetric;
201  return TRUE;
202 }
203 
204 DWORD
205 APIENTRY
207 {
208  PDC Dc;
209  PDC_ATTR pdcattr;
210  DWORD cscp;
211  // If here, update everything!
212  Dc = DC_LockDc(hDC);
213  if (!Dc)
214  {
216  return 0;
217  }
218  cscp = ftGdiGetTextCharsetInfo(Dc, NULL, 0);
219  pdcattr = Dc->pdcattr;
220  pdcattr->iCS_CP = cscp;
221  pdcattr->ulDirty_ &= ~DIRTY_CHARSET;
222  DC_UnlockDc( Dc );
223  return cscp;
224 }
225 
226 BOOL
227 APIENTRY
229  OUT LPRASTERIZER_STATUS praststat,
230  IN ULONG cjBytes)
231 {
233  RASTERIZER_STATUS rsSafe;
234 
235  if (praststat && cjBytes)
236  {
237  if ( cjBytes >= sizeof(RASTERIZER_STATUS) ) cjBytes = sizeof(RASTERIZER_STATUS);
238  if ( ftGdiGetRasterizerCaps(&rsSafe))
239  {
240  _SEH2_TRY
241  {
242  ProbeForWrite( praststat,
243  sizeof(RASTERIZER_STATUS),
244  1);
245  RtlCopyMemory(praststat, &rsSafe, cjBytes );
246  }
248  {
250  }
251  _SEH2_END;
252 
253  if (!NT_SUCCESS(Status))
254  {
256  return FALSE;
257  }
258 
259  return TRUE;
260  }
261  }
262  return FALSE;
263 }
264 
265 INT
266 APIENTRY
268  IN HDC hdc,
270  IN DWORD dwFlags)
271 {
272  PDC Dc;
273  INT Ret;
274  FONTSIGNATURE fsSafe;
275  PFONTSIGNATURE pfsSafe = &fsSafe;
277 
278  Dc = DC_LockDc(hdc);
279  if (!Dc)
280  {
282  return DEFAULT_CHARSET;
283  }
284 
285  if (!lpSig) pfsSafe = NULL;
286 
287  Ret = HIWORD(ftGdiGetTextCharsetInfo( Dc, pfsSafe, dwFlags));
288 
289  if (lpSig)
290  {
291  if (Ret == DEFAULT_CHARSET)
292  RtlZeroMemory(pfsSafe, sizeof(FONTSIGNATURE));
293 
294  _SEH2_TRY
295  {
296  ProbeForWrite( lpSig,
297  sizeof(FONTSIGNATURE),
298  1);
299  RtlCopyMemory(lpSig, pfsSafe, sizeof(FONTSIGNATURE));
300  }
302  {
304  }
305  _SEH2_END;
306 
307  if (!NT_SUCCESS(Status))
308  {
310  return DEFAULT_CHARSET;
311  }
312  }
313  DC_UnlockDc(Dc);
314  return Ret;
315 }
316 
317 
318 /*
319  fl :
320  GetTextExtentExPointW = 0 and everything else that uses this.
321  GetTextExtentExPointI = 1
322  */
323 W32KAPI
324 BOOL
325 APIENTRY
327  IN HDC hDC,
328  IN OPTIONAL LPWSTR UnsafeString,
329  IN ULONG Count,
330  IN ULONG MaxExtent,
331  OUT OPTIONAL PULONG UnsafeFit,
332  OUT OPTIONAL PULONG UnsafeDx,
333  OUT LPSIZE UnsafeSize,
334  IN FLONG fl
335 )
336 {
337  PDC dc;
338  PDC_ATTR pdcattr;
339  LPWSTR String;
340  SIZE Size;
342  BOOLEAN Result;
343  INT Fit;
344  LPINT Dx;
345  PTEXTOBJ TextObj;
346 
347  if ((LONG)Count < 0)
348  {
350  return FALSE;
351  }
352 
353  /* FIXME: Handle fl */
354 
355  if (0 == Count)
356  {
357  Size.cx = 0;
358  Size.cy = 0;
359  Status = MmCopyToCaller(UnsafeSize, &Size, sizeof(SIZE));
360  if (! NT_SUCCESS(Status))
361  {
363  return FALSE;
364  }
365  return TRUE;
366  }
367 
369  if (NULL == String)
370  {
372  return FALSE;
373  }
374 
375  if (NULL != UnsafeDx)
376  {
378  if (NULL == Dx)
379  {
382  return FALSE;
383  }
384  }
385  else
386  {
387  Dx = NULL;
388  }
389 
390  Status = MmCopyFromCaller(String, UnsafeString, Count * sizeof(WCHAR));
391  if (! NT_SUCCESS(Status))
392  {
393  if (NULL != Dx)
394  {
396  }
399  return FALSE;
400  }
401 
402  dc = DC_LockDc(hDC);
403  if (NULL == dc)
404  {
405  if (NULL != Dx)
406  {
408  }
411  return FALSE;
412  }
413  pdcattr = dc->pdcattr;
414  TextObj = RealizeFontInit(pdcattr->hlfntNew);
415  if ( TextObj )
416  {
418  TextObj,
419  String,
420  Count,
421  MaxExtent,
422  NULL == UnsafeFit ? NULL : &Fit,
423  Dx,
424  &Size,
425  fl);
426  TEXTOBJ_UnlockText(TextObj);
427  }
428  else
429  Result = FALSE;
430  DC_UnlockDc(dc);
431 
433  if (! Result)
434  {
435  if (NULL != Dx)
436  {
438  }
439  return FALSE;
440  }
441 
442  if (NULL != UnsafeFit)
443  {
444  Status = MmCopyToCaller(UnsafeFit, &Fit, sizeof(INT));
445  if (! NT_SUCCESS(Status))
446  {
447  if (NULL != Dx)
448  {
450  }
452  return FALSE;
453  }
454  }
455 
456  if (NULL != UnsafeDx)
457  {
458  Status = MmCopyToCaller(UnsafeDx, Dx, Count * sizeof(INT));
459  if (! NT_SUCCESS(Status))
460  {
461  if (NULL != Dx)
462  {
464  }
466  return FALSE;
467  }
468  }
469  if (NULL != Dx)
470  {
472  }
473 
474  Status = MmCopyToCaller(UnsafeSize, &Size, sizeof(SIZE));
475  if (! NT_SUCCESS(Status))
476  {
478  return FALSE;
479  }
480 
481  return TRUE;
482 }
483 
484 
485 /*
486  flOpts :
487  GetTextExtentPoint32W = 0
488  GetTextExtentPointW = 1
489  */
490 BOOL
491 APIENTRY
493  LPWSTR lpwsz,
494  INT cwc,
495  LPSIZE psize,
496  UINT flOpts)
497 {
498  return NtGdiGetTextExtentExW(hdc, lpwsz, cwc, 0, NULL, NULL, psize, flOpts);
499 }
500 
501 BOOL
502 APIENTRY
504  int BreakExtra,
505  int BreakCount)
506 {
507  PDC pDc;
508  PDC_ATTR pdcattr;
509 
510  pDc = DC_LockDc(hDC);
511  if (!pDc)
512  {
514  return FALSE;
515  }
516 
517  pdcattr = pDc->pdcattr;
518 
519  pdcattr->lBreakExtra = BreakExtra;
520  pdcattr->cBreak = BreakCount;
521 
522  DC_UnlockDc(pDc);
523  return TRUE;
524 }
525 
526 
527 W32KAPI
528 INT
529 APIENTRY
531  IN HDC hDC,
532  IN INT Count,
533  OUT OPTIONAL LPWSTR FaceName,
534  IN BOOL bAliasName
535 )
536 {
537  PDC Dc;
538  PDC_ATTR pdcattr;
539  HFONT hFont;
540  PTEXTOBJ TextObj;
542  SIZE_T fLen;
543  INT ret;
544 
545  /* FIXME: Handle bAliasName */
546 
547  Dc = DC_LockDc(hDC);
548  if (Dc == NULL)
549  {
551  return FALSE;
552  }
553  pdcattr = Dc->pdcattr;
554  hFont = pdcattr->hlfntNew;
555  DC_UnlockDc(Dc);
556 
557  TextObj = RealizeFontInit(hFont);
558  ASSERT(TextObj != NULL);
559  fLen = wcslen(TextObj->TextFace) + 1;
560 
561  if (FaceName != NULL)
562  {
563  Count = min(Count, fLen);
564  Status = MmCopyToCaller(FaceName, TextObj->TextFace, Count * sizeof(WCHAR));
565  if (!NT_SUCCESS(Status))
566  {
567  TEXTOBJ_UnlockText(TextObj);
569  return 0;
570  }
571  /* Terminate if we copied only part of the font name */
572  if (Count > 0 && Count < fLen)
573  {
574  FaceName[Count - 1] = '\0';
575  }
576  ret = Count;
577  }
578  else
579  {
580  ret = fLen;
581  }
582 
583  TEXTOBJ_UnlockText(TextObj);
584  return ret;
585 }
586 
587 W32KAPI
588 BOOL
589 APIENTRY
591  IN HDC hDC,
592  OUT TMW_INTERNAL * pUnsafeTmwi,
593  IN ULONG cj)
594 {
595  TMW_INTERNAL Tmwi;
596 
597  if ( cj <= sizeof(TMW_INTERNAL) )
598  {
599  if (ftGdiGetTextMetricsW(hDC, &Tmwi))
600  {
601  IntTMWFixUp(hDC, &Tmwi);
602  _SEH2_TRY
603  {
604  ProbeForWrite(pUnsafeTmwi, cj, 1);
605  RtlCopyMemory(pUnsafeTmwi, &Tmwi, cj);
606  }
608  {
610  _SEH2_YIELD(return FALSE);
611  }
612  _SEH2_END
613 
614  return TRUE;
615  }
616  }
617  return FALSE;
618 }
619 
620 /* EOF */
TEXTMETRICW TextMetric
Definition: ntgdityp.h:370
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define IN
Definition: typedefs.h:39
NTSYSAPI VOID NTAPI RtlCopyMemory(VOID UNALIGNED *Destination, CONST VOID UNALIGNED *Source, ULONG Length)
_In_ ULONG cj
Definition: winddi.h:3540
_Must_inspect_result_ _Out_ LPSIZE psize
Definition: ntgdi.h:1569
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:219
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
#define TRUE
Definition: types.h:120
FORCEINLINE VOID TEXTOBJ_UnlockText(PLFONT plfnt)
Definition: text.h:96
LONG lBreakExtra
Definition: ntgdihdl.h:332
#define DIRTY_CHARSET
Definition: ntgdihdl.h:149
BOOL FASTCALL GreGetTextExtentW(HDC hDC, LPCWSTR lpwsz, INT cwc, LPSIZE psize, UINT flOpts)
Definition: text.c:78
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
LONG NTSTATUS
Definition: precomp.h:26
static HDC
Definition: imagelist.c:92
BOOL APIENTRY NtGdiGetRasterizerCaps(OUT LPRASTERIZER_STATUS praststat, IN ULONG cjBytes)
Definition: text.c:228
struct _RASTERIZER_STATUS RASTERIZER_STATUS
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1223
#define MmCopyFromCaller
Definition: polytest.cpp:29
#define MmCopyToCaller(x, y, z)
Definition: mmcopy.h:19
static WCHAR String[]
Definition: stringtable.c:55
#define DEFAULT_CHARSET
Definition: wingdi.h:383
#define FASTCALL
Definition: nt_native.h:50
int32_t INT
Definition: typedefs.h:58
VOID NTAPI ProbeForWrite(IN PVOID Address, IN SIZE_T Length, IN ULONG Alignment)
Definition: exintrin.c:143
HFONT hFont
Definition: main.c:53
_SEH2_TRY
Definition: create.c:4226
_In_ FLONG fl
Definition: winddi.h:1279
#define FALSE
Definition: types.h:117
Definition: text.h:59
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define TMPF_TRUETYPE
Definition: wingdi.h:1312
HANDLE hlfntNew
Definition: ntgdihdl.h:334
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
BYTE tmPitchAndFamily
Definition: wingdi.h:2400
unsigned char BOOLEAN
BOOL FASTCALL ftGdiGetRasterizerCaps(LPRASTERIZER_STATUS lprs)
Definition: freetype.c:3108
smooth NULL
Definition: ftsmooth.c:416
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
#define _Out_
Definition: no_sal2.h:323
LONG cx
Definition: windef.h:334
void DPRINT(...)
Definition: polytest.cpp:61
BOOL FASTCALL GreTextOutW(HDC hdc, int nXStart, int nYStart, LPCWSTR lpString, int cchString)
Definition: text.c:61
VOID FASTCALL IntTMWFixUp(HDC hDC, TMW_INTERNAL *ptm)
Definition: text.c:30
unsigned long FLONG
Definition: ntbasedef.h:367
__kernel_entry W32KAPI HANDLE APIENTRY NtGdiGetDCObject(_In_ HDC hdc, _In_ INT itype)
ULONG ulDirty_
Definition: ntgdihdl.h:298
Definition: polytest.cpp:40
#define _SEH2_YIELD(STMT_)
Definition: pseh2_64.h:8
BOOL WINAPI GreGetTextMetricsW(_In_ HDC hdc, _Out_ LPTEXTMETRICW lptm)
Definition: text.c:193
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
W32KAPI BOOL APIENTRY NtGdiGetTextMetricsW(IN HDC hDC, OUT TMW_INTERNAL *pUnsafeTmwi, IN ULONG cj)
Definition: text.c:590
#define WINAPI
Definition: msvc.h:6
BOOL APIENTRY GreExtTextOutW(IN HDC hDC, IN INT XStart, IN INT YStart, IN UINT fuOptions, IN OPTIONAL PRECTL lprc, IN LPCWSTR String, IN INT Count, IN OPTIONAL LPINT Dx, IN DWORD dwCodePage)
Definition: freetype.c:6601
DWORD iCS_CP
Definition: ntgdihdl.h:309
unsigned long DWORD
Definition: ntddk_ex.h:95
LONG cBreak
Definition: ntgdihdl.h:333
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define wcsicmp
Definition: compat.h:15
int ret
Status
Definition: gdiplustypes.h:24
static const WCHAR L[]
Definition: oid.c:1250
HDC hdc
Definition: main.c:9
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
BOOL FASTCALL ftGdiGetTextMetricsW(HDC hDC, PTMW_INTERNAL ptmwi)
Definition: freetype.c:4542
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
BOOL APIENTRY NtGdiGetTextExtent(HDC hdc, LPWSTR lpwsz, INT cwc, LPSIZE psize, UINT flOpts)
Definition: text.c:492
VOID FASTCALL SetLastNtError(NTSTATUS Status)
Definition: error.c:36
#define TMPF_VECTOR
Definition: wingdi.h:1311
#define _In_
Definition: no_sal2.h:204
static HDC hDC
Definition: 3dtext.c:33
ULONG_PTR SIZE_T
Definition: typedefs.h:80
_SEH2_END
Definition: create.c:4400
#define GDITAG_TEXT
Definition: tags.h:171
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:237
PTEXTOBJ FASTCALL RealizeFontInit(HFONT hFont)
Definition: font.c:422
BOOL APIENTRY NtGdiSetTextJustification(HDC hDC, int BreakExtra, int BreakCount)
Definition: text.c:503
WCHAR TextFace[LF_FACESIZE]
Definition: text.h:67
unsigned int * PULONG
Definition: retypes.h:1
#define min(a, b)
Definition: monoChain.cc:55
unsigned int UINT
Definition: ndis.h:50
W32KAPI INT APIENTRY NtGdiGetTextFaceW(IN HDC hDC, IN INT Count, OUT OPTIONAL LPWSTR FaceName, IN BOOL bAliasName)
Definition: text.c:530
DWORD APIENTRY NtGdiGetCharSet(HDC hDC)
Definition: text.c:206
W32KAPI BOOL APIENTRY NtGdiGetTextExtentExW(IN HDC hDC, IN OPTIONAL LPWSTR UnsafeString, IN ULONG Count, IN ULONG MaxExtent, OUT OPTIONAL PULONG UnsafeFit, OUT OPTIONAL PULONG UnsafeDx, OUT LPSIZE UnsafeSize, IN FLONG fl)
Definition: text.c:326
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
#define OUT
Definition: typedefs.h:40
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
#define HIWORD(l)
Definition: typedefs.h:247
unsigned int ULONG
Definition: retypes.h:1
#define W32KAPI
Definition: ntgdi.h:9
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
static const WCHAR dc[]
INT APIENTRY NtGdiGetTextCharsetInfo(IN HDC hdc, OUT OPTIONAL LPFONTSIGNATURE lpSig, IN DWORD dwFlags)
Definition: text.c:267
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:6
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1099
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:12
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL FASTCALL TextIntGetTextExtentPoint(PDC dc, PTEXTOBJ TextObj, LPCWSTR String, INT Count, ULONG MaxExtent, LPINT Fit, LPINT Dx, LPSIZE Size, FLONG fl)
Definition: freetype.c:4218
return STATUS_SUCCESS
Definition: btrfs.c:3014
INT FASTCALL ftGdiGetTextCharsetInfo(PDC Dc, LPFONTSIGNATURE lpSig, DWORD dwFlags)
Definition: freetype.c:4361
LONG cy
Definition: windef.h:335
#define GDI_OBJECT_TYPE_FONT
Definition: gdi.h:50
BOOL FASTCALL GreGetTextExtentExW(HDC hDC, LPCWSTR String, ULONG Count, ULONG MaxExtent, PULONG Fit, PULONG Dx, LPSIZE pSize, FLONG fl)
Definition: text.c:135
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:27
static LPTEXTMETRICW lptm
Definition: font.c:42
INT NTAPI GreGetObject(IN HGDIOBJ hobj, IN INT cbCount, OUT PVOID pvBuffer)
Definition: gdiobj.c:1261
#define APIENTRY
Definition: api.h:79
int * LPINT
Definition: windef.h:178
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68