ReactOS 0.4.16-dev-320-g3bd9ddc
GetFontResourceInfoW.c File Reference
#include "precomp.h"
Include dependency graph for GetFontResourceInfoW.c:

Go to the source code of this file.

Classes

struct  GFRI_ENTRY
 

Typedefs

typedef struct GFRI_ENTRY GFRI_ENTRY
 

Functions

BOOL WINAPI GetFontResourceInfoW (LPCWSTR lpFileName, DWORD *pdwBufSize, void *lpBuffer, DWORD dwType)
 
static void GetSystemFontDirectory (LPWSTR pszDir)
 
static void GetSystemFontPath (LPWSTR pszPath, LPCWSTR pszFile)
 
static INT GetMultiSzLength (const WCHAR *pszz)
 
static void ReplaceChars (WCHAR *pch, INT Len, WCHAR From, WCHAR To)
 
static void SzFromMultiSz (WCHAR *pszz)
 
static void Test_GetFontResourceInfoW_case0 (LPCWSTR pszFilePath, const GFRI_ENTRY *Entry)
 
static void Test_GetFontResourceInfoW_case1 (LPCWSTR pszFilePath, const GFRI_ENTRY *Entry)
 
static void Test_GetFontResourceInfoW_case2 (LPCWSTR pszFilePath, const GFRI_ENTRY *Entry)
 
static void Test_GetFontResourceInfoW_case3 (LPCWSTR pszFilePath, const GFRI_ENTRY *Entry)
 
static void Test_GetFontResourceInfoW_case4 (LPCWSTR pszFilePath, const GFRI_ENTRY *Entry)
 
static void Test_GetFontResourceInfoW_case5 (LPCWSTR pszFilePath, const GFRI_ENTRY *Entry)
 
static void DoEntry (const GFRI_ENTRY *Entry)
 
 START_TEST (GetFontResourceInfoW)
 

Variables

static const GFRI_ENTRY TestEntries []
 
static const GFRI_ENTRY AdditionalTestEntriesJapanese []
 
static const GFRI_ENTRY AdditionalTestEntriesEnglish []
 

Typedef Documentation

◆ GFRI_ENTRY

Function Documentation

◆ DoEntry()

static void DoEntry ( const GFRI_ENTRY Entry)
static

Definition at line 397 of file GetFontResourceInfoW.c.

398{
400 BOOL Installed = FALSE;
401
402 if (Entry->Preinstalled)
403 {
405 printf("GetSystemFontPath: %S\n", szPath);
407 {
408 skip("Font file \"%S\" was not found\n", szPath);
409 return;
410 }
411 }
412 else
413 {
414 /* load font data from resource */
417 HRSRC hRsrc = FindResourceW(hMod, Entry->File, (LPCWSTR)RT_RCDATA);
418 HGLOBAL hGlobal = LoadResource(hMod, hRsrc);
419 DWORD Size = SizeofResource(hMod, hRsrc);
420 LPVOID pFont = LockResource(hGlobal);
421
422 /* get temporary file name */
425 printf("GetTempFileNameW: %S\n", szPath);
426
427 /* write to file */
430 WriteFile(hFile, pFont, Size, &Size, NULL);
432
433 /* check existence */
435 {
436 skip("Font file \"%S\" was not stored\n", szPath);
437 return;
438 }
439
440 /* install */
441 Installed = !!AddFontResourceW(szPath);
442 if (!Installed)
443 {
444 skip("Font file \"%S\" was not installed\n", szPath);
447 return;
448 }
449 }
450
457
458 if (!Entry->Preinstalled)
459 {
460 if (Installed)
461 {
464 }
465 }
466}
static void Test_GetFontResourceInfoW_case1(LPCWSTR pszFilePath, const GFRI_ENTRY *Entry)
static void Test_GetFontResourceInfoW_case4(LPCWSTR pszFilePath, const GFRI_ENTRY *Entry)
static void Test_GetFontResourceInfoW_case5(LPCWSTR pszFilePath, const GFRI_ENTRY *Entry)
static void Test_GetFontResourceInfoW_case2(LPCWSTR pszFilePath, const GFRI_ENTRY *Entry)
static void Test_GetFontResourceInfoW_case3(LPCWSTR pszFilePath, const GFRI_ENTRY *Entry)
static void GetSystemFontPath(LPWSTR pszPath, LPCWSTR pszFile)
static void Test_GetFontResourceInfoW_case0(LPCWSTR pszFilePath, const GFRI_ENTRY *Entry)
#define skip(...)
Definition: atltest.h:64
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
#define MAX_PATH
Definition: compat.h:34
#define CreateFileW
Definition: compat.h:741
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define FILE_SHARE_READ
Definition: compat.h:136
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
Definition: path.c:2080
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
Definition: res.c:176
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:568
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
Definition: filename.c:84
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
#define printf
Definition: freeldr.h:97
#define CREATE_ALWAYS
Definition: disk.h:72
LPCWSTR szPath
Definition: env.c:37
static char szTempPath[MAX_PATH]
Definition: data.c:16
_In_ HANDLE hFile
Definition: mswsock.h:90
#define GENERIC_WRITE
Definition: nt_native.h:90
#define L(x)
Definition: ntvdm.h:50
#define RT_RCDATA
Definition: pedump.c:372
#define _countof(array)
Definition: sndvol32.h:70
base of all file and directory entries
Definition: entries.h:83
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
int WINAPI AddFontResourceW(_In_ LPCWSTR pszFilename)
BOOL WINAPI RemoveFontResourceW(_In_ LPCWSTR)
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185

Referenced by START_TEST().

◆ GetFontResourceInfoW()

◆ GetMultiSzLength()

static INT GetMultiSzLength ( const WCHAR pszz)
static

Definition at line 107 of file GetFontResourceInfoW.c.

108{
109 INT Len, TotalLen = 0;
110 for (;;)
111 {
112 Len = lstrlenW(pszz);
113 TotalLen += Len + 1;
114 pszz += Len + 1;
115 if (*pszz == 0)
116 break;
117 }
118 ++TotalLen;
119 return TotalLen;
120}
#define Len
Definition: deflate.h:82
#define lstrlenW
Definition: compat.h:750
int32_t INT
Definition: typedefs.h:58

Referenced by SzFromMultiSz().

◆ GetSystemFontDirectory()

static void GetSystemFontDirectory ( LPWSTR  pszDir)
static

Definition at line 92 of file GetFontResourceInfoW.c.

93{
95 lstrcatW(pszDir, L"\\Fonts");
96}
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2352
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
_In_ LPCSTR pszDir
Definition: shellapi.h:585

Referenced by GetSystemFontPath().

◆ GetSystemFontPath()

static void GetSystemFontPath ( LPWSTR  pszPath,
LPCWSTR  pszFile 
)
static

Definition at line 99 of file GetFontResourceInfoW.c.

100{
101 GetSystemFontDirectory(pszPath);
102 lstrcatW(pszPath, L"\\");
103 lstrcatW(pszPath, pszFile);
104}
static void GetSystemFontDirectory(LPWSTR pszDir)

Referenced by DoEntry().

◆ ReplaceChars()

static void ReplaceChars ( WCHAR pch,
INT  Len,
WCHAR  From,
WCHAR  To 
)
static

Definition at line 123 of file GetFontResourceInfoW.c.

124{
125 while (Len > 0)
126 {
127 if (*pch == From)
128 {
129 *pch = To;
130 }
131 //printf("0x%04X, ", *pch);
132 ++pch;
133 --Len;
134 }
135}
#define pch(ap)
Definition: match.c:418

Referenced by SzFromMultiSz().

◆ START_TEST()

START_TEST ( GetFontResourceInfoW  )

Definition at line 468 of file GetFontResourceInfoW.c.

469{
470 INT i;
471 const GFRI_ENTRY *Entry;
472
473 printf("sizeof(LOGFONTW) == %u\n", (int)sizeof(LOGFONTW));
474
475 for (i = 0; i < _countof(TestEntries); ++i)
476 {
477 Entry = &TestEntries[i];
478 DoEntry(Entry);
479 }
480
482 {
483 /* Japanese */
485 {
487 DoEntry(Entry);
488 }
489 }
490 else
491 {
492 /* non-Japanese */
493 for (i = 0; i < _countof(AdditionalTestEntriesEnglish); ++i)
494 {
496 DoEntry(Entry);
497 }
498 }
499}
static const GFRI_ENTRY AdditionalTestEntriesJapanese[]
static void DoEntry(const GFRI_ENTRY *Entry)
static const GFRI_ENTRY AdditionalTestEntriesEnglish[]
static const GFRI_ENTRY TestEntries[]
LANGID WINAPI GetSystemDefaultLangID(void)
Definition: locale.c:1194
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define LANG_JAPANESE
Definition: nls.h:76
#define PRIMARYLANGID(l)
Definition: nls.h:16

◆ SzFromMultiSz()

static void SzFromMultiSz ( WCHAR pszz)
static

Definition at line 138 of file GetFontResourceInfoW.c.

139{
141 //printf("Length: %d\n", Length);
142 if (Length > 0)
143 {
144 ReplaceChars(pszz, Length - 1, L'\0', L'|');
145 pszz[Length - 1] = 0;
146 }
147 else
148 {
149 pszz[0] = 0;
150 }
151 //printf("pszz: %S\n", pszz);
152}
static INT GetMultiSzLength(const WCHAR *pszz)
static void ReplaceChars(WCHAR *pch, INT Len, WCHAR From, WCHAR To)
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102

Referenced by Test_GetFontResourceInfoW_case1().

◆ Test_GetFontResourceInfoW_case0()

static void Test_GetFontResourceInfoW_case0 ( LPCWSTR  pszFilePath,
const GFRI_ENTRY Entry 
)
static

Definition at line 155 of file GetFontResourceInfoW.c.

156{
157 BOOL Ret;
158 DWORD Size, Case = 0;
159 DWORD Data;
160
161 /* data NULL, size zero */
162 Size = 0;
163 Ret = GetFontResourceInfoW(pszFilePath, &Size, NULL, Case);
164 ok_int(Ret, 1);
165 ok_int(Size, 4);
166
167 /* data NULL, size non-zero */
168 Size = 1024;
169 Ret = GetFontResourceInfoW(pszFilePath, &Size, NULL, Case);
170 ok_int(Ret, 0);
171 ok_int(Size, 1024);
172
173 /* size zero */
174 Data = 0xDEADFACE;
175 Size = 0;
176 Ret = GetFontResourceInfoW(pszFilePath, &Size, &Data, Case);
177 ok_int(Ret, 1);
178 ok_int(Data, 0xDEADFACE);
179 ok_int(Size, 4);
180
181 /* size non-zero */
182 Data = 0xDEADFACE;
183 Size = sizeof(Data);
184 Ret = GetFontResourceInfoW(pszFilePath, &Size, &Data, Case);
185 ok_int(Ret, 1);
186 ok_int(Data, Entry->FontCount);
187 ok_int(Size, 4);
188}
BOOL WINAPI GetFontResourceInfoW(LPCWSTR lpFileName, DWORD *pdwBufSize, void *lpBuffer, DWORD dwType)
#define ok_int(expression, result)
Definition: atltest.h:134

Referenced by DoEntry().

◆ Test_GetFontResourceInfoW_case1()

static void Test_GetFontResourceInfoW_case1 ( LPCWSTR  pszFilePath,
const GFRI_ENTRY Entry 
)
static

Definition at line 191 of file GetFontResourceInfoW.c.

192{
193 BOOL Ret;
194 DWORD Size, Case = 1;
195 static WCHAR Data[1024 / sizeof(WCHAR)];
196
197 /* data NULL, size zero */
198 Size = 0;
199 Ret = GetFontResourceInfoW(pszFilePath, &Size, NULL, Case);
200 ok_int(Ret, 1);
201 /* FIXME: What's the result of Size? */
202 ok(Size != 0, "Size expected non-zero but zero\n");
203
204 /* data NULL, size non-zero */
205 Size = 1024;
206 Ret = GetFontResourceInfoW(pszFilePath, &Size, NULL, Case);
207 ok_int(Ret, 0);
208 ok_int(Size, 1024);
209
210 /* size zero */
211 Size = 0;
212 CopyMemory(Data, L"ABC\0", sizeof(L"ABC\0"));
213 Ret = GetFontResourceInfoW(pszFilePath, &Size, Data, Case);
214 ok_int(Ret, 1);
215 /* FIXME: What's the result of Size? */
216 ok(Size != 0, "Size expected non-zero but zero\n");
217 ok(lstrcmpiW(Data, L"ABC") == 0, "data mismatched: \"%S\"\n", Data);
218
219 /* size non-zero */
220 Size = 1024;
221 CopyMemory(Data, L"ABC\0", sizeof(L"ABC\0"));
222 Ret = GetFontResourceInfoW(pszFilePath, &Size, Data, Case);
223 ok_int(Ret, 1);
224 /* FIXME: What's the result of Size? */
225 ok(Size != 0, "Size expected non-zero but zero\n");
226
228 ok(lstrcmpiW(Data, Entry->FontInfo) == 0, "data mismatched: \"%S\" and \"%S\"\n",
229 Data, Entry->FontInfo);
230#if 0
231 if (lstrcmpiW(Data, Entry->FontInfo) != 0)
232 {
233 int i, len = lstrlenW(Data) + 1;
234 for (i = 0; i < len; ++i)
235 {
236 printf("0x%04X <=> 0x%04X\n", Data[i], Entry->FontInfo[i]);
237 }
238 }
239#endif
240}
static void SzFromMultiSz(WCHAR *pszz)
#define ok(value,...)
Definition: atltest.h:57
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4262
GLenum GLsizei len
Definition: glext.h:6722
#define CopyMemory
Definition: winbase.h:1735

Referenced by DoEntry().

◆ Test_GetFontResourceInfoW_case2()

static void Test_GetFontResourceInfoW_case2 ( LPCWSTR  pszFilePath,
const GFRI_ENTRY Entry 
)
static

Definition at line 243 of file GetFontResourceInfoW.c.

244{
245 BOOL Ret;
246 DWORD i, Size, Case = 2;
247 static LOGFONTW Data[100];
248
249 /* data NULL, size zero */
250 Size = 0;
251 Ret = GetFontResourceInfoW(pszFilePath, &Size, NULL, Case);
252 ok_int(Ret, 1);
253 ok_int(Size, Entry->FontCount * sizeof(LOGFONTW));
254
255 /* data NULL, size non-zero */
256 Size = 1024;
257 Ret = GetFontResourceInfoW(pszFilePath, &Size, NULL, Case);
258 ok_int(Ret, 0);
259 ok_int(Size, 1024);
260
261 /* size zero */
262 Size = 0;
263 ZeroMemory(Data, sizeof(Data));
264 Ret = GetFontResourceInfoW(pszFilePath, &Size, Data, Case);
265 ok_int(Ret, 1);
266 ok_int(Size, Entry->FontCount * sizeof(LOGFONTW));
267
268 /* size non-zero */
269 Size = sizeof(Data);
270 ZeroMemory(Data, sizeof(Data));
271 Ret = GetFontResourceInfoW(pszFilePath, &Size, Data, Case);
272 ok_int(Ret, 1);
273 ok_int(Size, Entry->FontCount * sizeof(LOGFONTW));
274 for (i = 0; i < Entry->FontCount; ++i)
275 {
276 ok(lstrcmpiW(Data[i].lfFaceName, Entry->FaceNames[i]) == 0,
277 "face name #%d mismatched: \"%S\" and \"%S\"\n", (int)i, Data[i].lfFaceName, Entry->FaceNames[i]);
278#if 0
279 if (lstrcmpiW(Data[i].lfFaceName, Entry->FaceNames[i]) != 0)
280 {
281 int k, len = lstrlenW(Data[i].lfFaceName);
282 for (k = 0; k < len; ++k)
283 {
284 printf("0x%04X <=> 0x%04X\n", Entry->FaceNames[i][k], Data[i].lfFaceName[k]);
285 }
286 }
287#endif
288 }
289}
int k
Definition: mpi.c:3369
#define ZeroMemory
Definition: winbase.h:1737

Referenced by DoEntry().

◆ Test_GetFontResourceInfoW_case3()

static void Test_GetFontResourceInfoW_case3 ( LPCWSTR  pszFilePath,
const GFRI_ENTRY Entry 
)
static

Definition at line 292 of file GetFontResourceInfoW.c.

293{
294 BOOL Ret;
295 DWORD Size, Case = 3;
296 DWORD Data[2];
297
298 /* data NULL, size zero */
299 Size = 0;
300 Ret = GetFontResourceInfoW(pszFilePath, &Size, NULL, Case);
301 ok_int(Ret, 1);
302 ok_int(Size, 4);
303
304 /* data NULL, size non-zero */
305 Size = sizeof(Data);
306 Ret = GetFontResourceInfoW(pszFilePath, &Size, NULL, Case);
307 ok_int(Ret, 0);
308 ok_int(Size, 8);
309
310 /* size zero */
311 Size = 0;
312 Data[0] = 0xDEADFACE;
313 Ret = GetFontResourceInfoW(pszFilePath, &Size, Data, Case);
314 ok_int(Ret, 1);
315 ok_int(Size, 4);
316 ok_int(Data[0], 0xDEADFACE);
317
318 /* size non-zero */
319 Size = sizeof(Data);
320 Data[0] = 0xDEADFACE;
321 Ret = GetFontResourceInfoW(pszFilePath, &Size, Data, Case);
322 ok_int(Ret, 1);
323 ok_int(Size, 4);
324 ok_int(Data[0], 1);
325}

Referenced by DoEntry().

◆ Test_GetFontResourceInfoW_case4()

static void Test_GetFontResourceInfoW_case4 ( LPCWSTR  pszFilePath,
const GFRI_ENTRY Entry 
)
static

Definition at line 328 of file GetFontResourceInfoW.c.

329{
330 BOOL Ret;
331 DWORD Size, Case = 4;
333
334 /* data NULL, size zero */
335 Size = 0;
336 Ret = GetFontResourceInfoW(pszFilePath, &Size, NULL, Case);
337 ok_int(Ret, 1);
338 ok_int(Size, (lstrlenW(pszFilePath) + 1) * sizeof(WCHAR));
339
340 /* data NULL, size non-zero */
341 Size = MAX_PATH;
342 Ret = GetFontResourceInfoW(pszFilePath, &Size, NULL, Case);
343 ok_int(Ret, 0);
345
346 /* size zero */
347 Size = 0;
348 Ret = GetFontResourceInfoW(pszFilePath, &Size, Data, Case);
349 ok_int(Ret, 1);
350 ok_int(Size, (lstrlenW(pszFilePath) + 1) * sizeof(WCHAR));
351
352 /* size non-zero */
353 Size = MAX_PATH;
354 Ret = GetFontResourceInfoW(pszFilePath, &Size, Data, Case);
355 ok_int(Ret, 1);
356 ok_int(Size, (lstrlenW(pszFilePath) + 1) * sizeof(WCHAR));
357 ok(lstrcmpiW(pszFilePath, Data) == 0, "data mismatched: \"%S\"\n", Data);
358}

Referenced by DoEntry().

◆ Test_GetFontResourceInfoW_case5()

static void Test_GetFontResourceInfoW_case5 ( LPCWSTR  pszFilePath,
const GFRI_ENTRY Entry 
)
static

Definition at line 361 of file GetFontResourceInfoW.c.

362{
363 BOOL Ret;
364 DWORD Size, Case = 5;
365 DWORD Data;
366
367 /* data NULL, size zero */
368 Size = 0;
369 Ret = GetFontResourceInfoW(pszFilePath, &Size, NULL, Case);
370 ok_int(Ret, 1);
371 ok_int(Size, 4);
372
373 /* data NULL, size non-zero */
374 Size = sizeof(Data);
375 Ret = GetFontResourceInfoW(pszFilePath, &Size, NULL, Case);
376 ok_int(Ret, 0);
377 ok_int(Size, 4);
378
379 /* size zero */
380 Size = 0;
381 Data = 0xDEADFACE;
382 Ret = GetFontResourceInfoW(pszFilePath, &Size, &Data, Case);
383 ok_int(Ret, 1);
384 ok_int(Size, 4);
385 ok_int(Data, 0xDEADFACE);
386
387 /* size non-zero */
388 Size = sizeof(Data);
389 Data = 0xDEADFACE;
390 Ret = GetFontResourceInfoW(pszFilePath, &Size, &Data, Case);
391 ok_int(Ret, 1);
392 ok_int(Size, 4);
393 ok_int(Data, 0);
394}

Referenced by DoEntry().

Variable Documentation

◆ AdditionalTestEntriesEnglish

const GFRI_ENTRY AdditionalTestEntriesEnglish[]
static
Initial value:
=
{
{
L"msgothic.ttc", TRUE,
L"MS Gothic & MS UI Gothic & MS PGothic|",
6,
{
L"MS Gothic",
L"@MS Gothic",
L"MS UI Gothic",
L"@MS UI Gothic",
L"MS PGothic",
L"@MS PGothic"
}
},
{
L"ExampleFont.ttf", FALSE,
L"EnglishDisplayName|",
1,
{
L"EnglishFamilyName"
}
}
}
#define TRUE
Definition: types.h:120

Definition at line 65 of file GetFontResourceInfoW.c.

Referenced by START_TEST().

◆ AdditionalTestEntriesJapanese

const GFRI_ENTRY AdditionalTestEntriesJapanese[]
static

Definition at line 32 of file GetFontResourceInfoW.c.

Referenced by START_TEST().

◆ TestEntries

const GFRI_ENTRY TestEntries[]
static
Initial value:
=
{
{ L"symbol.ttf", TRUE, L"Symbol|", 1, { L"Symbol" } },
{ L"tahoma.ttf", TRUE, L"Tahoma|", 1, { L"Tahoma" } },
{ L"tahomabd.ttf", TRUE, L"Tahoma Bold|", 1, { L"Tahoma" } }
}

Definition at line 24 of file GetFontResourceInfoW.c.

Referenced by START_TEST().