xref: /reactos/win32ss/drivers/font/ftfd/ftfd.h (revision 65ce1461)
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 <stdarg.h>
9 #include <windef.h>
10 #include <wingdi.h>
11 #include <winddi.h>
12 
13 #include <ft2build.h>
14 #include FT_FREETYPE_H
15 
16 extern FT_Library gftlibrary;
17 
18 #define TAG_GLYPHSET 'GlSt'
19 #define TAG_IFIMETRICS 'Ifim'
20 
21 /** Driver specific types *****************************************************/
22 
23 typedef struct
24 {
25     FT_UInt index;
26     FT_ULong code;
27 } FTFD_CHARPAIR;
28 
29 typedef struct
30 {
31     PVOID pvView;
32     ULONG cjView;
33     ULONG_PTR iFile;
34     ULONG cNumFaces;
35     FT_Face aftface[1];
36 } FTFD_FILE, *PFTFD_FILE;
37 
38 //"Bold Italic Underline Strikeout"
39 #define MAX_STYLESIZE 35
40 typedef struct
41 {
42     IFIMETRICS ifim;
43     BYTE ajCharSet[16];
44     FONTSIM fontsim;
45     WCHAR wszFamilyName[LF_FACESIZE];
46     WCHAR wszFaceName[LF_FACESIZE];
47     WCHAR wszStyleName[MAX_STYLESIZE];
48 } FTFD_IFIMETRICS, *PFTFD_IFIMETRICS;
49 
50 /** Function prototypes *******************************************************/
51 
52 ULONG
53 DbgPrint(IN PCCH Format, IN ...);
54 
55 DHPDEV
56 APIENTRY
57 FtfdEnablePDEV(
58     IN DEVMODEW *pdm,
59     IN LPWSTR pwszLogAddress,
60     IN ULONG cPat,
61     OUT HSURF *phsurfPatterns,
62     IN ULONG cjCaps,
63     OUT ULONG *pdevcaps,
64     IN ULONG cjDevInfo,
65     OUT DEVINFO *pdi,
66     IN HDEV hdev,
67     IN LPWSTR pwszDeviceName,
68     IN HANDLE hDriver);
69 
70 VOID
71 APIENTRY
72 FtfdCompletePDEV(
73     IN DHPDEV dhpdev,
74     IN HDEV hdev);
75 
76 VOID
77 APIENTRY
78 FtfdDisablePDEV(
79     IN DHPDEV dhpdev);
80 
81 ULONG_PTR
82 APIENTRY
83 FtfdLoadFontFile(
84     ULONG cFiles,
85     ULONG_PTR *piFile,
86     PVOID *ppvView,
87     ULONG *pcjView,
88     DESIGNVECTOR *pdv,
89     ULONG ulLangID,
90     ULONG ulFastCheckSum);
91 
92 BOOL
93 APIENTRY
94 FtfdUnloadFontFile(
95     IN ULONG_PTR iFile);
96 
97 LONG
98 APIENTRY
99 FtfdQueryFontFile(
100     ULONG_PTR iFile,
101     ULONG ulMode,
102     ULONG cjBuf,
103     ULONG *pulBuf);
104 
105 LONG
106 APIENTRY
107 FtfdQueryFontCaps(
108     ULONG culCaps,
109     ULONG *pulCaps);
110 
111 PVOID
112 APIENTRY
113 FtfdQueryFontTree(
114     DHPDEV dhpdev,
115     ULONG_PTR iFile,
116     ULONG iFace,
117     ULONG iMode,
118     ULONG_PTR *pid);
119 
120 PIFIMETRICS
121 APIENTRY
122 FtfdQueryFont(
123     IN DHPDEV dhpdev,
124     IN ULONG_PTR iFile,
125     IN ULONG iFace,
126     IN ULONG_PTR *pid);
127 
128 VOID
129 APIENTRY
130 FtfdFree(
131     PVOID pv,
132     ULONG_PTR id);
133 
134 PFD_GLYPHATTR
135 APIENTRY
136 FtfdQueryGlyphAttrs(
137 	FONTOBJ *pfo,
138 	ULONG iMode);
139 
140 LONG
141 APIENTRY
142 FtfdQueryFontData(
143 	DHPDEV dhpdev,
144 	FONTOBJ *pfo,
145 	ULONG iMode,
146 	HGLYPH hg,
147 	OUT GLYPHDATA *pgd,
148 	PVOID pv,
149 	ULONG cjSize);
150 
151