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