1 #ifndef __T2EMBED_API_H
2 #define __T2EMBED_API_H
4 #ifndef CHARSET_UNICODE
5 #define CHARSET_UNICODE 1
6 #define CHARSET_DEFAULT 1
7 #define CHARSET_SYMBOL 2
8 #define CHARSET_GLYPHIDX 3
11 #ifndef EMBED_PREVIEWPRINT
12 #define EMBED_PREVIEWPRINT 1
13 #define EMBED_EDITABLE 2
14 #define EMBED_INSTALLABLE 3
15 #define EMBED_NOEMBEDDING 4
18 #ifndef LICENSE_INSTALLABLE
19 #define LICENSE_INSTALLABLE 0x0
20 #define LICENSE_DEFAULT 0x0
21 #define LICENSE_NOEMBEDDING 0x2
22 #define LICENSE_PREVIEWPRINT 0x4
23 #define LICENSE_EDITABLE 0x8
27 #define TTEMBED_RAW 0x0
28 #define TTEMBED_SUBSET 0x1
29 #define TTEMBED_TTCOMPRESSED 0x4
30 #define TTEMBED_FAILIFVARIATIONSIMULATED 0x10
31 #define TTEMBED_EMBEDEUDC 0x20
32 #define TTEMBED_VALIDATIONTESTS 0x40
33 #define TTEMBED_WEBOBJECT 0x80
34 #define TTEMBED_ENCRYPTDATA 0x10000000
41 #ifndef E_CHARCODECOUNTINVALID
42 #define E_CHARCODECOUNTINVALID 0x2
43 #define E_CHARCODESETINVALID 0x3
44 #define E_DEVICETRUETYPEFONT 0x4
45 #define E_HDCINVALID 0x6
46 #define E_NOFREEMEMORY 0x7
47 #define E_FONTREFERENCEINVALID 0x8
48 #define E_NOTATRUETYPEFONT 0xA
49 #define E_ERRORACCESSINGFONTDATA 0xC
50 #define E_ERRORACCESSINGFACENAME 0xD
51 #define E_ERRORUNICODECONVERSION 0x11
52 #define E_ERRORCONVERTINGCHARS 0x12
53 #define E_EXCEPTION 0x13
54 #define E_RESERVEDPARAMNOTNULL 0x14
55 #define E_CHARSETINVALID 0x15
56 #define E_WIN32S_NOTSUPPORTED 0x16
57 #define E_FILE_NOT_FOUND 0x17
58 #define E_TTC_INDEX_OUT_OF_RANGE 0x18
59 #define E_INPUTPARAMINVALID 0x19
62 #ifndef E_ERRORCOMPRESSINGFONTDATA
63 #define E_ERRORCOMPRESSINGFONTDATA 0x100
64 #define E_FONTDATAINVALID 0x102
65 #define E_NAMECHANGEFAILED 0x103
66 #define E_FONTNOTEMBEDDABLE 0x104
67 #define E_PRIVSINVALID 0x105
68 #define E_SUBSETTINGFAILED 0x106
69 #define E_READFROMSTREAMFAILED 0x107
70 #define E_SAVETOSTREAMFAILED 0x108
72 #define E_T2NOFREEMEMORY 0x10A
73 #define E_ERRORREADINGFONTDATA 0x10B
74 #define E_FLAGSINVALID 0x10C
75 #define E_ERRORCREATINGFONTFILE 0x10D
76 #define E_FONTALREADYEXISTS 0x10E
77 #define E_FONTNAMEALREADYEXISTS 0x10F
78 #define E_FONTINSTALLFAILED 0x110
79 #define E_ERRORDECOMPRESSINGFONTDATA 0x111
80 #define E_ERRORACCESSINGEXCLUDELIST 0x112
81 #define E_FACENAMEINVALID 0x113
82 #define E_STREAMINVALID 0x114
83 #define E_STATUSINVALID 0x115
84 #define E_PRIVSTATUSINVALID 0x116
85 #define E_PERMISSIONSINVALID 0x117
86 #define E_PBENABLEDINVALID 0x118
87 #define E_SUBSETTINGEXCEPTION 0x119
88 #define E_SUBSTRING_TEST_FAIL 0x11A
89 #define E_FONTVARIATIONSIMULATED 0x11B
90 #define E_FONTVALIDATEFAIL 0x11C
91 #define E_FONTFAMILYNAMENOTINFULL 0x11D
94 #ifndef E_ADDFONTFAILED
95 #define E_ADDFONTFAILED 0x200
96 #define E_COULDNTCREATETEMPFILE 0x201
97 #define E_FONTFILECREATEFAILED 0x203
98 #define E_WINDOWSAPI 0x204
99 #define E_FONTFILENOTFOUND 0x205
100 #define E_RESOURCEFILECREATEFAILED 0x206
101 #define E_ERROREXPANDINGFONTDATA 0x207
102 #define E_ERRORGETTINGDC 0x208
103 #define E_EXCEPTIONINDECOMPRESSION 0x209
104 #define E_EXCEPTIONINCOMPRESSION 0x20A
111 typedef unsigned long(WINAPIV
*WRITEEMBEDPROC
)
113 void* lpvWriteStream
,
114 const void* lpvBuffer
,
115 const unsigned long cbBuffer
118 typedef unsigned long(WINAPIV
*READEMBEDPROC
)
122 const unsigned long cbBuffer
128 unsigned long ulStructSize
;
131 unsigned long ulCharSet
;
132 unsigned short usReserved1
;
133 unsigned short usCharCodeCount
;
134 unsigned short* pusCharCodeSet
;
135 } TTVALIDATIONTESTPARAMS
;
139 unsigned long ulStructSize
;
142 unsigned long ulCharSet
;
143 unsigned short usReserved1
;
144 unsigned short usCharCodeCount
;
145 unsigned long* pulCharCodeSet
;
146 } TTVALIDATIONTESTPARAMSEX
;
150 unsigned short usStructSize
;
151 unsigned short usRootStrSize
;
152 unsigned short *pusRootStr
;
157 unsigned short usStructSize
;
158 unsigned short usRefStrSize
;
159 unsigned short *pusRefStr
;
164 TTCharToUnicode(HDC hDC
,
166 ULONG ulCharCodeSize
,
167 USHORT
* pusShortCodes
,
168 ULONG ulShortCodeSize
,
173 TTDeleteEmbeddedFont(HANDLE hFontReference
,
182 ULONG
* pulPrivStatus
,
184 WRITEEMBEDPROC lpfnWriteToStream
,
185 LPVOID lpvWriteStream
,
186 USHORT
* pusCharCodeSet
,
187 USHORT usCharCodeCount
,
189 TTEMBEDINFO
* pTTEmbedInfo
);
193 TTEmbedFontFromFileA(HDC hDC
,
194 LPCSTR szFontFileName
,
198 ULONG
* pulPrivStatus
,
200 WRITEEMBEDPROC lpfnWriteToStream
,
201 LPVOID lpvWriteStream
,
202 USHORT
* pusCharCodeSet
,
203 USHORT usCharCodeCount
,
205 TTEMBEDINFO
* pTTEmbedInfo
);
209 TTEnableEmbeddingForFacename(LPSTR lpszFacename
,
214 TTGetEmbeddedFontInfo(ULONG ulFlags
,
215 ULONG
* pulPrivStatus
,
218 READEMBEDPROC lpfnReadFromStream
,
219 LPVOID lpvReadStream
,
220 TTLOADINFO
* pTTLoadInfo
);
224 TTGetEmbeddingType(HDC hDC
,
225 ULONG
* pulPrivStatus
);
229 TTIsEmbeddingEnabled(HDC hDC
,
234 TTIsEmbeddingEnabledForFacename(LPSTR lpszFacename
,
239 TTLoadEmbeddedFont(HANDLE
*phFontReference
,
241 ULONG
* pulPrivStatus
,
244 READEMBEDPROC lpfnReadFromStream
,
245 LPVOID lpvReadStream
,
246 LPWSTR szWinFamilyName
,
247 LPSTR szMacFamilyName
,
248 TTLOADINFO
* pTTLoadInfo
);
252 TTRunValidationTests(HDC hDC
,
253 TTVALIDATIONTESTPARAMS
* pTestParam
);
257 TTEmbedFontEx(HDC hDC
,
260 ULONG
* pulPrivStatus
,
262 WRITEEMBEDPROC lpfnWriteToStream
,
263 LPVOID lpvWriteStream
,
264 ULONG
* pulCharCodeSet
,
265 USHORT usCharCodeCount
,
267 TTEMBEDINFO
* pTTEmbedInfo
);
271 TTRunValidationTestsEx(HDC hDC
,
272 TTVALIDATIONTESTPARAMSEX
* pTestParam
);
276 TTGetNewFontName(HANDLE
* phFontReference
,
277 LPWSTR szWinFamilyName
,
279 LPSTR szMacFamilyName
,
286 #endif /* __T2EMBED_API_H */