ReactOS 0.4.15-dev-8235-gcd88a97
font.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS win32 subsystem
3 * LICENSE: GPL - See COPYING in the top level directory
4 * PURPOSE: GDI font driver for bitmap fonts
5 * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
6 */
7
8#include "ftfd.h"
9
12 PVOID pvView,
13 ULONG cjView)
14{
15 CHAR *pc;
16
17 pc = EngAllocMem(0, cjView, 'tmp ');
18 memcpy(pc, pvView, cjView);
19
20 *pc = 0;
21
22 return pc;
23}
24
30 ULONG cFiles,
32 PVOID *ppvView,
33 ULONG *pcjView,
37{
38 PVOID pvView;
39 ULONG cjView, i;
40 FT_Error fterror;
41 FT_Face ftface;
42 PFTFD_FILE pfile;
43 ULONG cjSize, cNumFaces;
44
45 DbgPrint("FtfdLoadFontFile()\n");
46
47 /* Check parameters */
48 if (cFiles != 1)
49 {
50 DbgPrint("Only 1 File is allowed, got %ld!\n", cFiles);
51 return HFF_INVALID;
52 }
53
54 /* Map the font file */
55 if (!EngMapFontFileFD(*piFile, (PULONG*)&pvView, &cjView))
56 {
57 DbgPrint("Could not map font file!\n");
58 return HFF_INVALID;
59 }
60
61 // HACK!!!
62 pvView = HackFixup(pvView, cjView);
63
64 fterror = FT_New_Memory_Face(gftlibrary, pvView, cjView, 0, &ftface);
65 if (fterror)
66 {
67 DbgPrint("No faces found in file\n");
68
69 /* Unmap the file */
71
72 /* Failure! */
73 return HFF_INVALID;
74 }
75
76 /* Get number of faces from the first face */
77 cNumFaces = ftface->num_faces;
78
79 cjSize = sizeof(FTFD_FILE) + cNumFaces * sizeof(FT_Face);
80 pfile = EngAllocMem(0, cjSize, 'dftF');
81 if (!pfile)
82 {
83 DbgPrint("EngAllocMem() failed.\n");
84
85 /* Unmap the file */
87
88 /* Failure! */
89 return HFF_INVALID;
90 }
91
92 pfile->cNumFaces = cNumFaces;
93 pfile->iFile = *piFile;
94 pfile->pvView = pvView;
95 pfile->cjView = cjView;
96
97 for (i = 0; i < pfile->cNumFaces; i++)
98 {
99 pfile->aftface[i] = ftface;
100 FT_Select_Charmap(ftface, FT_ENCODING_UNICODE);
101 }
102
103 DbgPrint("Success! Returning %ld faces\n", cNumFaces);
104
105 return (ULONG_PTR)pfile;
106}
107
108BOOL
112{
113 PFTFD_FILE pfile = (PFTFD_FILE)iFile;
114 ULONG i;
115
116 DbgPrint("FtfdUnloadFontFile()\n");
117
118 // HACK!!!
119 EngFreeMem(pfile->pvView);
120
121 /* Cleanup faces */
122 for (i = 0; i < pfile->cNumFaces; i++)
123 {
124 FT_Done_Face(pfile->aftface[i]);
125 }
126
127 /* Unmap the font file */
129
130 /* Free the memory that was allocated for the font */
131 EngFreeMem(pfile);
132
133 return TRUE;
134}
135
136
137LONG
142 ULONG cjBuf,
143 ULONG *pulBuf)
144{
145 PFTFD_FILE pfile = (PFTFD_FILE)iFile;
146
147 DbgPrint("FtfdQueryFontFile(ulMode=%ld)\n", ulMode);
148// __debugbreak();
149
150 switch (ulMode)
151 {
152 case QFF_DESCRIPTION:
153 {
154 return 0;
155 }
156
157 case QFF_NUMFACES:
158 /* return the number of faces in the file */
159 return pfile->cNumFaces;
160
161 }
162
163 return FD_ERROR;
164}
165
166
170 IN DHPDEV dhpdev,
172 IN ULONG iFace,
174{
175 PFTFD_FILE pfile = (PFTFD_FILE)iFile;
176 PFTFD_IFIMETRICS pifiX;
177 PIFIMETRICS pifi;
178 FT_Face ftface;
179 FT_Error fterror;
180 ULONG i;
181
182 DbgPrint("FtfdQueryFont()\n");
183
184 /* Validate parameters */
185 if (iFace > pfile->cNumFaces || !pid)
186 {
187 DbgPrint("iFace > pfile->cNumFaces || !pid\n");
188 return NULL;
189 }
190
192 pfile->pvView,
193 pfile->cjView,
194 iFace - 1,
195 &ftface);
196 if (fterror)
197 {
198 DbgPrint("FT_New_Memory_Face failed\n");
199 return NULL;
200 }
201
202 /* Allocate the ifi metrics structure */
204 if (!pifiX)
205 {
206 DbgPrint("EngAllocMem() failed.\n");
207 FT_Done_Face(ftface);
208 return NULL;
209 }
210
211 /* Fill IFIMETRICS */
212 pifi = &pifiX->ifim;
213 pifi->cjThis = sizeof(FTFD_IFIMETRICS);
214 pifi->cjIfiExtra = 0;
215
216 /* Relative offsets */
217 pifi->dpwszFamilyName = FIELD_OFFSET(FTFD_IFIMETRICS, wszFamilyName);
218 pifi->dpwszStyleName = FIELD_OFFSET(FTFD_IFIMETRICS, wszStyleName);
219 pifi->dpwszFaceName = FIELD_OFFSET(FTFD_IFIMETRICS, wszFaceName);
220 pifi->dpwszUniqueName = FIELD_OFFSET(FTFD_IFIMETRICS, wszFaceName);
221 pifi->dpCharSets = FIELD_OFFSET(FTFD_IFIMETRICS, ajCharSet);
222 pifi->dpFontSim = 0;
223
224 /* Charsets */
226 pifiX->ajCharSet[0] = pifi->jWinCharSet;
227 for (i = 1; i < 16; i++)
228 {
229 pifiX->ajCharSet[i] = DEFAULT_CHARSET;
230 }
231
232 pifi->lEmbedId = 0;
233 pifi->lItalicAngle = 0;
234 pifi->lCharBias = 0;
236 pifi->usWinWeight = FW_MEDIUM; // FIXME
242 pifi->fsSelection = 0;
243 pifi->fsType = 0;
244
245 /* Font resolution */
246 pifi->fwdUnitsPerEm = ftface->units_per_EM;
247 pifi->fwdLowestPPEm = 8; // FIXME
248
249 /* Font metrics */
250 pifi->fwdWinAscender = ftface->ascender;
251 pifi->fwdWinDescender = - ftface->descender;
252 pifi->fwdMacAscender = pifi->fwdWinAscender;
253 pifi->fwdMacDescender = - pifi->fwdWinDescender;
254 pifi->fwdMacLineGap = 0;
255 pifi->fwdTypoAscender = pifi->fwdWinAscender;
256 pifi->fwdTypoDescender = 0; // FIXME!!! - pifi->fwdWinDescender;
257 pifi->fwdTypoLineGap = 0;
258 pifi->fwdAveCharWidth = 1085; // FIXME
259 pifi->fwdMaxCharInc = ftface->max_advance_width;
260 pifi->fwdCapHeight = pifi->fwdUnitsPerEm / 2;
261 pifi->fwdXHeight = pifi->fwdUnitsPerEm / 4;
262 pifi->fwdSubscriptXSize = 0;
263 pifi->fwdSubscriptYSize = 0;
264 pifi->fwdSubscriptXOffset = 0;
265 pifi->fwdSubscriptYOffset = 0;
266 pifi->fwdSuperscriptXSize = 0;
267 pifi->fwdSuperscriptYSize = 0;
268 pifi->fwdSuperscriptXOffset = 0;
269 pifi->fwdSuperscriptYOffset = 0;
270 pifi->fwdUnderscoreSize = 1;
271 pifi->fwdUnderscorePosition = -1;
272 pifi->fwdStrikeoutSize = 1;
273 pifi->fwdStrikeoutPosition = pifi->fwdXHeight + 1;
274
275 pifi->ptlBaseline.x = 1;
276 pifi->ptlBaseline.y = 0;
277 pifi->ptlAspect.x = 1;
278 pifi->ptlAspect.y = 1;
279 pifi->ptlCaret.x = 0;
280 pifi->ptlCaret.y = 1;
281
282 /* Set the biggest characters bounding box */
283 pifi->rclFontBox.left = ftface->bbox.xMin;
284 pifi->rclFontBox.right = ftface->bbox.xMax;
285 pifi->rclFontBox.top = ftface->bbox.yMax;
286 pifi->rclFontBox.bottom = ftface->bbox.yMin;
287
288 /* Special characters */
289 pifi->chFirstChar = 0x1c; // FIXME
290 pifi->chLastChar = 0x79;
291 pifi->chDefaultChar = 0x1d;
292 pifi->chBreakChar = 0x1e;
293 pifi->wcFirstChar = 0x1e;
294 pifi->wcLastChar = 0x79;
295 pifi->wcDefaultChar = 0x1d;
296 pifi->wcBreakChar = 0x1e;
297
298
299 *(DWORD*)&pifi->achVendId = 0x30303030; // FIXME
300 pifi->cKerningPairs = 0;
302// pifi->panose = panose;
303
306 NULL,
307 ftface->family_name,
308 strnlen(ftface->family_name, MAX_PATH));
309
312 NULL,
313 ftface->style_name,
314 strnlen(ftface->style_name, MAX_PATH));
315
318 NULL,
319 ftface->family_name,
320 strnlen(ftface->family_name, MAX_PATH));
321
322 FT_Done_Face(ftface);
323
324 DbgPrint("Finished with the ifi: %p\n", pifiX);
325 __debugbreak();
326
327 return pifi;
328}
329
330
331LONG
334 ULONG culCaps,
335 ULONG *pulCaps)
336{
337 DbgPrint("FtfdQueryFontCaps()\n");
338
339 /* We need room for 2 ULONGs */
340 if (culCaps < 2)
341 {
342 return FD_ERROR;
343 }
344
345 /* We only support 1 bpp */
346 pulCaps[0] = 2;
347 pulCaps[1] = QC_1BIT;
348
349 return 2;
350}
351
352
353PVOID
356 DHPDEV dhpdev,
358 ULONG iFace,
359 ULONG iMode,
360 ULONG_PTR *pid)
361{
362 PFTFD_FILE pfile = (PFTFD_FILE)iFile;
363 FT_Face ftface;
364 FT_Error fterror;
365 FTFD_CHARPAIR *pcp;
366 FD_GLYPHSET *pGlyphSet;
367 FT_ULong charcode;
368 ULONG i, j, cGlyphs, cRuns, cjSize;
369 WCRUN *pwcrun;
370 HGLYPH * phglyphs;
371
372 DbgPrint("FtfdQueryFontTree()\n");
373
375 pfile->pvView,
376 pfile->cjView,
377 iFace - 1,
378 &ftface);
379 if (fterror)
380 {
381 DbgPrint("FT_New_Memory_Face() failed.\n");
382 return NULL;
383 }
384
385 /* Get initial value for cGlyphs from ftface */
386 cGlyphs = ftface->num_glyphs + 1;
387
388 /* Allocate a buffer for the char codes and glyph indexes */
389 pcp = EngAllocMem(0, cGlyphs * sizeof(FTFD_CHARPAIR), 'pcp ');
390 if (!pcp)
391 {
392 DbgPrint("EngAllocMem() failed.\n");
393 return NULL;
394 }
395
396 /* Gather char codes and indexes and count WCRUNs */
397 pcp[0].code = FT_Get_First_Char(ftface, &pcp[0].index);
398 charcode = pcp[0].code;
399 for (i = 1, cRuns = 1; charcode && i < cGlyphs; i++)
400 {
401 charcode = FT_Get_Next_Char(ftface, charcode, &pcp[i].index);
402 DbgPrint("charcode=0x%lx, index=0x%lx\n", charcode, pcp[i].index);
403 pcp[i].code = charcode;
404 if (charcode != pcp[i - 1].code + 1)
405 {
406 cRuns++;
407 }
408 }
409
410 /* Update cGlyphs to real value */
411 cGlyphs = i - 1;
412
413 /* Calculate FD_GLYPHSET size */
414 cjSize = sizeof(FD_GLYPHSET)
415 + (cRuns - 1) * sizeof(WCRUN)
416 + cGlyphs * sizeof(HGLYPH);
417
418 /* Allocate the FD_GLYPHSET structure */
419 pGlyphSet = EngAllocMem(0, cjSize, TAG_GLYPHSET);
420 if (!pGlyphSet)
421 {
422 DbgPrint("EngAllocMem() failed.\n");
423 EngFreeMem(pcp);
424 return NULL;
425 }
426
427 /* Initialize FD_GLYPHSET */
428 pGlyphSet->cjThis = cjSize;
429 pGlyphSet->flAccel = 0;
430 pGlyphSet->cGlyphsSupported = cGlyphs;
431 pGlyphSet->cRuns = cRuns;
432
433 /* Initialize 1st WCRUN */
434 pwcrun = pGlyphSet->awcrun;
435 phglyphs = (PHGLYPH)&pGlyphSet->awcrun[cRuns];
436 pwcrun[0].wcLow = pcp[0].code;
437 pwcrun[0].cGlyphs = 1;
438 pwcrun[0].phg = &phglyphs[0];
439 phglyphs[0] = pcp[0].index;
440
441DbgPrint("pcp[0].index = 0x%lx\n", pcp[0].index);
442
443 /* Walk through all supported chars */
444 for (i = 1, j = 0; i < cGlyphs; i++)
445 {
446 /* Use glyph index as HGLYPH */
447 phglyphs[i] = pcp[i].index;
448
449 /* Check whether we can append the wchar to a run */
450 if (pcp[i].code == pcp[i - 1].code + 1)
451 {
452 /* Append to current WCRUN */
453 pwcrun[j].cGlyphs++;
454 }
455 else
456 {
457 /* Add a new WCRUN */
458 DbgPrint("adding new run\n");
459 j++;
460 pwcrun[j].wcLow = pcp[i].code;
461 pwcrun[j].cGlyphs = 1;
462 pwcrun[j].phg = &phglyphs[i];
463 }
464 }
465
466 /* Free the temporary buffer */
467 EngFreeMem(pcp);
468
469 /* Set *pid to the allocated structure for use in FtfdFree */
470 *pid = (ULONG_PTR)pGlyphSet;
471
472DbgPrint("pGlyphSet=%p\n", pGlyphSet);
474
475 return pGlyphSet;
476}
477
478VOID
481 PVOID pv,
482 ULONG_PTR id)
483{
484 DbgPrint("FtfdFree()\n");
485 if (id)
486 {
487 EngFreeMem((PVOID)id);
488 }
489}
490
491
492
#define TAG_GLYPHSET
Definition: bmfd.h:42
#define TAG_IFIMETRICS
Definition: bmfd.h:43
#define LF_FACESIZE
Definition: dimm.idl:39
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define APIENTRY
Definition: api.h:79
#define MAX_PATH
Definition: compat.h:34
#define ULONG_PTR
Definition: config.h:101
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FT_Done_Face(FT_Face face)
Definition: ftobjs.c:2721
FT_Get_First_Char(FT_Face face, FT_UInt *agindex)
Definition: ftobjs.c:3697
FT_Select_Charmap(FT_Face face, FT_Encoding encoding)
Definition: ftobjs.c:3457
FT_Get_Next_Char(FT_Face face, FT_ULong char_code, FT_UInt *agindex)
Definition: ftobjs.c:3722
FT_New_Memory_Face(FT_Library library, const FT_Byte *file_base, FT_Long file_size, FT_Long face_index, FT_Face *aface)
Definition: ftobjs.c:1431
struct FTFD_FILE * PFTFD_FILE
unsigned long FT_ULong
Definition: fttypes.h:253
int FT_Error
Definition: fttypes.h:300
GLuint index
Definition: glext.h:6031
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
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 GLint GLint j
Definition: glfuncs.h:250
#define DbgPrint
Definition: hal.h:12
void __cdecl __debugbreak(void)
Definition: intrin_ppc.h:698
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
long LONG
Definition: pedump.c:60
#define EngFreeMem
Definition: polytest.cpp:56
#define FL_ZERO_MEMORY
Definition: polytest.cpp:58
void * EngAllocMem(int zero, unsigned long size, int tag=0)
Definition: polytest.cpp:70
FT_ULong code
Definition: ftfd.h:29
FT_UInt index
Definition: ftfd.h:28
Definition: ftfd.h:33
ULONG_PTR iFile
Definition: ftfd.h:36
ULONG cNumFaces
Definition: ftfd.h:37
ULONG cjView
Definition: ftfd.h:35
PVOID pvView
Definition: ftfd.h:34
FT_Face aftface[1]
Definition: ftfd.h:38
WCHAR wszFamilyName[LF_FACESIZE]
Definition: ftfd.h:48
IFIMETRICS ifim
Definition: ftfd.h:45
WCHAR wszStyleName[MAX_STYLESIZE]
Definition: ftfd.h:50
BYTE ajCharSet[16]
Definition: ftfd.h:46
WCHAR wszFaceName[LF_FACESIZE]
Definition: ftfd.h:49
FT_Pos xMin
Definition: ftimage.h:117
FT_Pos yMax
Definition: ftimage.h:118
FT_Pos yMin
Definition: ftimage.h:117
FT_Pos xMax
Definition: ftimage.h:118
FT_Long num_glyphs
Definition: freetype.h:1076
FT_Short descender
Definition: freetype.h:1096
FT_BBox bbox
Definition: freetype.h:1092
FT_UShort units_per_EM
Definition: freetype.h:1094
FT_String * style_name
Definition: freetype.h:1079
FT_Short max_advance_width
Definition: freetype.h:1099
FT_String * family_name
Definition: freetype.h:1078
FT_Long num_faces
Definition: freetype.h:1070
FT_Short ascender
Definition: freetype.h:1095
long bottom
Definition: polytest.cpp:53
long right
Definition: polytest.cpp:53
long top
Definition: polytest.cpp:53
long left
Definition: polytest.cpp:53
ULONG cjThis
Definition: winddi.h:641
ULONG cRuns
Definition: winddi.h:644
ULONG cGlyphsSupported
Definition: winddi.h:643
FLONG flAccel
Definition: winddi.h:642
FWORD fwdWinDescender
Definition: winddi.h:1067
PTRDIFF dpCharSets
Definition: winddi.h:1057
ULONG cjThis
Definition: winddi.h:1047
FWORD fwdUnderscoreSize
Definition: winddi.h:1086
BYTE chDefaultChar
Definition: winddi.h:1092
BYTE chFirstChar
Definition: winddi.h:1090
ULONG cjIfiExtra
Definition: winddi.h:1048
BYTE chBreakChar
Definition: winddi.h:1093
FWORD fwdTypoAscender
Definition: winddi.h:1071
ULONG ulPanoseCulture
Definition: winddi.h:1104
USHORT fsSelection
Definition: winddi.h:1062
PTRDIFF dpwszUniqueName
Definition: winddi.h:1052
PTRDIFF dpwszFamilyName
Definition: winddi.h:1049
FWORD fwdStrikeoutPosition
Definition: winddi.h:1089
PTRDIFF dpwszStyleName
Definition: winddi.h:1050
FWORD fwdSubscriptYSize
Definition: winddi.h:1079
FWORD fwdSubscriptXSize
Definition: winddi.h:1078
FWORD fwdSuperscriptYSize
Definition: winddi.h:1083
POINTL ptlAspect
Definition: winddi.h:1099
WCHAR wcLastChar
Definition: winddi.h:1095
FWORD fwdMacDescender
Definition: winddi.h:1069
LONG lCharBias
Definition: winddi.h:1056
FWORD fwdUnitsPerEm
Definition: winddi.h:1064
FWORD fwdAveCharWidth
Definition: winddi.h:1074
ULONG flInfo
Definition: winddi.h:1061
FWORD fwdCapHeight
Definition: winddi.h:1076
FWORD fwdTypoDescender
Definition: winddi.h:1072
FWORD fwdUnderscorePosition
Definition: winddi.h:1087
POINTL ptlBaseline
Definition: winddi.h:1098
FWORD fwdMacAscender
Definition: winddi.h:1068
FWORD fwdSubscriptYOffset
Definition: winddi.h:1081
BYTE jWinPitchAndFamily
Definition: winddi.h:1059
FWORD fwdTypoLineGap
Definition: winddi.h:1073
FWORD fwdSuperscriptXSize
Definition: winddi.h:1082
FWORD fwdXHeight
Definition: winddi.h:1077
FWORD fwdSuperscriptYOffset
Definition: winddi.h:1085
FWORD fwdMacLineGap
Definition: winddi.h:1070
BYTE chLastChar
Definition: winddi.h:1091
BYTE jWinCharSet
Definition: winddi.h:1058
LONG lItalicAngle
Definition: winddi.h:1055
USHORT usWinWeight
Definition: winddi.h:1060
FWORD fwdLowestPPEm
Definition: winddi.h:1065
PTRDIFF dpwszFaceName
Definition: winddi.h:1051
BYTE achVendId[4]
Definition: winddi.h:1102
RECTL rclFontBox
Definition: winddi.h:1101
WCHAR wcBreakChar
Definition: winddi.h:1097
FWORD fwdMaxCharInc
Definition: winddi.h:1075
USHORT fsType
Definition: winddi.h:1063
FWORD fwdStrikeoutSize
Definition: winddi.h:1088
LONG lEmbedId
Definition: winddi.h:1054
FWORD fwdSubscriptXOffset
Definition: winddi.h:1080
PTRDIFF dpFontSim
Definition: winddi.h:1053
ULONG cKerningPairs
Definition: winddi.h:1103
WCHAR wcFirstChar
Definition: winddi.h:1094
FWORD fwdWinAscender
Definition: winddi.h:1066
POINTL ptlCaret
Definition: winddi.h:1100
FWORD fwdSuperscriptXOffset
Definition: winddi.h:1084
WCHAR wcDefaultChar
Definition: winddi.h:1096
LONG y
Definition: windef.h:330
LONG x
Definition: windef.h:329
Definition: winddi.h:634
HGLYPH * phg
Definition: winddi.h:637
WCHAR wcLow
Definition: winddi.h:635
USHORT cGlyphs
Definition: winddi.h:636
Definition: inflate.c:139
uint32_t * PULONG
Definition: typedefs.h:59
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
FT_Library gftlibrary
Definition: enable.c:26
BOOL APIENTRY FtfdUnloadFontFile(IN ULONG_PTR iFile)
Definition: font.c:110
LONG APIENTRY FtfdQueryFontFile(ULONG_PTR iFile, ULONG ulMode, ULONG cjBuf, ULONG *pulBuf)
Definition: font.c:139
PIFIMETRICS APIENTRY FtfdQueryFont(IN DHPDEV dhpdev, IN ULONG_PTR iFile, IN ULONG iFace, IN ULONG_PTR *pid)
Definition: font.c:169
PVOID HackFixup(PVOID pvView, ULONG cjView)
Definition: font.c:11
PVOID APIENTRY FtfdQueryFontTree(DHPDEV dhpdev, ULONG_PTR iFile, ULONG iFace, ULONG iMode, ULONG_PTR *pid)
Definition: font.c:355
ULONG_PTR APIENTRY FtfdLoadFontFile(ULONG cFiles, ULONG_PTR *piFile, PVOID *ppvView, ULONG *pcjView, DESIGNVECTOR *pdv, ULONG ulLangID, ULONG ulFastCheckSum)
Definition: font.c:29
LONG APIENTRY FtfdQueryFontCaps(ULONG culCaps, ULONG *pulCaps)
Definition: font.c:333
VOID APIENTRY FtfdFree(PVOID pv, ULONG_PTR id)
Definition: font.c:480
#define FD_ERROR
Definition: winddi.h:153
#define FM_INFO_4BPP
Definition: winddi.h:1014
struct _WCRUN WCRUN
typedef DHPDEV(APIENTRY FN_DrvEnablePDEV)(_In_ DEVMODEW *pdm
_In_ ULONG_PTR _In_opt_ DESIGNVECTOR _In_ ULONG ulLangID
Definition: winddi.h:3724
_In_ DWORD cjBuf
Definition: winddi.h:3827
struct _FD_GLYPHSET FD_GLYPHSET
_In_ ULONG_PTR _In_ ULONG iFace
Definition: winddi.h:3836
ENGAPI VOID APIENTRY EngMultiByteToUnicodeN(_Out_writes_bytes_to_(MaxBytesInUnicodeString, *BytesInUnicodeString) LPWSTR UnicodeString, _In_ ULONG MaxBytesInUnicodeString, _Out_opt_ PULONG BytesInUnicodeString, _In_reads_bytes_(BytesInMultiByteString) PCHAR MultiByteString, _In_ ULONG BytesInMultiByteString)
#define FM_INFO_1BPP
Definition: winddi.h:1013
#define QFF_DESCRIPTION
Definition: winddi.h:3879
#define FM_INFO_RETURNS_OUTLINES
Definition: winddi.h:1023
_In_ ULONG iMode
Definition: winddi.h:3520
HGLYPH * PHGLYPH
Definition: winddi.h:131
#define FM_INFO_RIGHT_HANDED
Definition: winddi.h:1027
_In_ FONTOBJ _In_ ULONG _In_ ULONG cGlyphs
Definition: winddi.h:3799
#define HFF_INVALID
Definition: winddi.h:156
_In_ CLIPOBJ _In_opt_ XLATEOBJ _In_ TRIVERTEX _In_ ULONG _In_ PVOID _In_ ULONG _In_ RECTL _In_ POINTL _In_ ULONG ulMode
Definition: winddi.h:3657
ENGAPI VOID APIENTRY EngUnmapFontFileFD(_In_ ULONG_PTR iFile)
Definition: mapping.c:564
_In_ ULONG_PTR _In_opt_ DESIGNVECTOR * pdv
Definition: winddi.h:3723
_In_ ULONG_PTR _In_opt_ DESIGNVECTOR _In_ ULONG _In_ ULONG ulFastCheckSum
Definition: winddi.h:3725
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3837
_In_ ULONG cjSize
Definition: winddi.h:3634
_In_ ULONG_PTR iFile
Definition: winddi.h:3835
#define FM_INFO_TECH_TRUETYPE
Definition: winddi.h:1008
#define FM_PANOSE_CULTURE_LATIN
Definition: winddi.h:1044
#define FM_INFO_ARB_XFORMS
Definition: winddi.h:1012
#define QFF_NUMFACES
Definition: winddi.h:3880
_In_ ULONG_PTR * piFile
Definition: winddi.h:3720
#define FM_INFO_RETURNS_BITMAPS
Definition: winddi.h:1025
#define QC_1BIT
Definition: winddi.h:3843
#define VARIABLE_PITCH
Definition: wingdi.h:445
#define FF_DONTCARE
Definition: wingdi.h:448
#define DEFAULT_CHARSET
Definition: wingdi.h:384
#define ANSI_CHARSET
Definition: wingdi.h:383
#define FW_MEDIUM
Definition: wingdi.h:375
char CHAR
Definition: xmlstorage.h:175