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 #define E_API_NOTIMPL 0x0001L
43 #ifndef E_CHARCODECOUNTINVALID
44 #define E_CHARCODECOUNTINVALID 0x2
45 #define E_CHARCODESETINVALID 0x3
46 #define E_DEVICETRUETYPEFONT 0x4
47 #define E_HDCINVALID 0x6
48 #define E_NOFREEMEMORY 0x7
49 #define E_FONTREFERENCEINVALID 0x8
50 #define E_NOTATRUETYPEFONT 0xA
51 #define E_ERRORACCESSINGFONTDATA 0xC
52 #define E_ERRORACCESSINGFACENAME 0xD
53 #define E_ERRORUNICODECONVERSION 0x11
54 #define E_ERRORCONVERTINGCHARS 0x12
55 #define E_EXCEPTION 0x13
56 #define E_RESERVEDPARAMNOTNULL 0x14
57 #define E_CHARSETINVALID 0x15
58 #define E_WIN32S_NOTSUPPORTED 0x16
59 #define E_FILE_NOT_FOUND 0x17
60 #define E_TTC_INDEX_OUT_OF_RANGE 0x18
61 #define E_INPUTPARAMINVALID 0x19
64 #ifndef E_ERRORCOMPRESSINGFONTDATA
65 #define E_ERRORCOMPRESSINGFONTDATA 0x100
66 #define E_FONTDATAINVALID 0x102
67 #define E_NAMECHANGEFAILED 0x103
68 #define E_FONTNOTEMBEDDABLE 0x104
69 #define E_PRIVSINVALID 0x105
70 #define E_SUBSETTINGFAILED 0x106
71 #define E_READFROMSTREAMFAILED 0x107
72 #define E_SAVETOSTREAMFAILED 0x108
74 #define E_T2NOFREEMEMORY 0x10A
75 #define E_ERRORREADINGFONTDATA 0x10B
76 #define E_FLAGSINVALID 0x10C
77 #define E_ERRORCREATINGFONTFILE 0x10D
78 #define E_FONTALREADYEXISTS 0x10E
79 #define E_FONTNAMEALREADYEXISTS 0x10F
80 #define E_FONTINSTALLFAILED 0x110
81 #define E_ERRORDECOMPRESSINGFONTDATA 0x111
82 #define E_ERRORACCESSINGEXCLUDELIST 0x112
83 #define E_FACENAMEINVALID 0x113
84 #define E_STREAMINVALID 0x114
85 #define E_STATUSINVALID 0x115
86 #define E_PRIVSTATUSINVALID 0x116
87 #define E_PERMISSIONSINVALID 0x117
88 #define E_PBENABLEDINVALID 0x118
89 #define E_SUBSETTINGEXCEPTION 0x119
90 #define E_SUBSTRING_TEST_FAIL 0x11A
91 #define E_FONTVARIATIONSIMULATED 0x11B
92 #define E_FONTVALIDATEFAIL 0x11C
93 #define E_FONTFAMILYNAMENOTINFULL 0x11D
96 #ifndef E_ADDFONTFAILED
97 #define E_ADDFONTFAILED 0x200
98 #define E_COULDNTCREATETEMPFILE 0x201
99 #define E_FONTFILECREATEFAILED 0x203
100 #define E_WINDOWSAPI 0x204
101 #define E_FONTFILENOTFOUND 0x205
102 #define E_RESOURCEFILECREATEFAILED 0x206
103 #define E_ERROREXPANDINGFONTDATA 0x207
104 #define E_ERRORGETTINGDC 0x208
105 #define E_EXCEPTIONINDECOMPRESSION 0x209
106 #define E_EXCEPTIONINCOMPRESSION 0x20A
113 typedef unsigned long(WINAPIV
*WRITEEMBEDPROC
)
115 void* lpvWriteStream
,
116 const void* lpvBuffer
,
117 const unsigned long cbBuffer
120 typedef unsigned long(WINAPIV
*READEMBEDPROC
)
124 const unsigned long cbBuffer
130 unsigned long ulStructSize
;
133 unsigned long ulCharSet
;
134 unsigned short usReserved1
;
135 unsigned short usCharCodeCount
;
136 unsigned short* pusCharCodeSet
;
137 } TTVALIDATIONTESTPARAMS
;
141 unsigned long ulStructSize
;
144 unsigned long ulCharSet
;
145 unsigned short usReserved1
;
146 unsigned short usCharCodeCount
;
147 unsigned long* pulCharCodeSet
;
148 } TTVALIDATIONTESTPARAMSEX
;
152 unsigned short usStructSize
;
153 unsigned short usRootStrSize
;
154 unsigned short *pusRootStr
;
159 unsigned short usStructSize
;
160 unsigned short usRefStrSize
;
161 unsigned short *pusRefStr
;
166 TTCharToUnicode(HDC hDC
,
168 ULONG ulCharCodeSize
,
169 USHORT
* pusShortCodes
,
170 ULONG ulShortCodeSize
,
175 TTDeleteEmbeddedFont(HANDLE hFontReference
,
184 ULONG
* pulPrivStatus
,
186 WRITEEMBEDPROC lpfnWriteToStream
,
187 LPVOID lpvWriteStream
,
188 USHORT
* pusCharCodeSet
,
189 USHORT usCharCodeCount
,
191 TTEMBEDINFO
* pTTEmbedInfo
);
195 TTEmbedFontFromFileA(HDC hDC
,
196 LPCSTR szFontFileName
,
200 ULONG
* pulPrivStatus
,
202 WRITEEMBEDPROC lpfnWriteToStream
,
203 LPVOID lpvWriteStream
,
204 USHORT
* pusCharCodeSet
,
205 USHORT usCharCodeCount
,
207 TTEMBEDINFO
* pTTEmbedInfo
);
211 TTEnableEmbeddingForFacename(LPSTR lpszFacename
,
216 TTGetEmbeddedFontInfo(ULONG ulFlags
,
217 ULONG
* pulPrivStatus
,
220 READEMBEDPROC lpfnReadFromStream
,
221 LPVOID lpvReadStream
,
222 TTLOADINFO
* pTTLoadInfo
);
226 TTGetEmbeddingType(HDC hDC
,
227 ULONG
* pulPrivStatus
);
231 TTIsEmbeddingEnabled(HDC hDC
,
236 TTIsEmbeddingEnabledForFacename(LPCSTR lpszFacename
,
241 TTLoadEmbeddedFont(HANDLE
*phFontReference
,
243 ULONG
* pulPrivStatus
,
246 READEMBEDPROC lpfnReadFromStream
,
247 LPVOID lpvReadStream
,
248 LPWSTR szWinFamilyName
,
249 LPSTR szMacFamilyName
,
250 TTLOADINFO
* pTTLoadInfo
);
254 TTRunValidationTests(HDC hDC
,
255 TTVALIDATIONTESTPARAMS
* pTestParam
);
259 TTEmbedFontEx(HDC hDC
,
262 ULONG
* pulPrivStatus
,
264 WRITEEMBEDPROC lpfnWriteToStream
,
265 LPVOID lpvWriteStream
,
266 ULONG
* pulCharCodeSet
,
267 USHORT usCharCodeCount
,
269 TTEMBEDINFO
* pTTEmbedInfo
);
273 TTRunValidationTestsEx(HDC hDC
,
274 TTVALIDATIONTESTPARAMSEX
* pTestParam
);
278 TTGetNewFontName(HANDLE
* phFontReference
,
279 LPWSTR szWinFamilyName
,
281 LPSTR szMacFamilyName
,
288 #endif /* __T2EMBED_API_H */