]>
Commit | Line | Data |
---|---|---|
b75a7d8f | 1 | /* |
b75a7d8f | 2 | * |
729e4ab9 | 3 | * (C) Copyright IBM Corp. 1998-2009 - All Rights Reserved |
b75a7d8f A |
4 | * |
5 | */ | |
6 | ||
7 | #ifndef __LETYPES_H | |
8 | #define __LETYPES_H | |
9 | ||
374ca955 | 10 | #if !defined(LE_USE_CMEMORY) && (defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_STATIC_IMPLEMENTATION) || defined(U_COMBINED_IMPLEMENTATION)) |
b75a7d8f A |
11 | #define LE_USE_CMEMORY |
12 | #endif | |
13 | ||
14 | #include "unicode/utypes.h" | |
46f4442e A |
15 | |
16 | #ifdef XP_CPLUSPLUS | |
b75a7d8f | 17 | #include "unicode/uobject.h" |
46f4442e | 18 | #endif |
b75a7d8f A |
19 | |
20 | #ifdef LE_USE_CMEMORY | |
21 | #include "cmemory.h" | |
22 | #endif | |
23 | ||
73c04bcf A |
24 | /*! |
25 | * \file | |
46f4442e | 26 | * \brief C API: Basic definitions for the ICU LayoutEngine |
73c04bcf A |
27 | */ |
28 | ||
b75a7d8f A |
29 | /** |
30 | * A type used for signed, 32-bit integers. | |
31 | * | |
32 | * @stable ICU 2.4 | |
33 | */ | |
34 | typedef int32_t le_int32; | |
35 | ||
36 | /** | |
37 | * A type used for unsigned, 32-bit integers. | |
38 | * | |
39 | * @stable ICU 2.4 | |
40 | */ | |
41 | typedef uint32_t le_uint32; | |
42 | ||
43 | /** | |
44 | * A type used for signed, 16-bit integers. | |
45 | * | |
46 | * @stable ICU 2.4 | |
47 | */ | |
48 | typedef int16_t le_int16; | |
49 | ||
50 | /** | |
51 | * A type used for unsigned, 16-bit integers. | |
52 | * | |
53 | * @stable ICU 2.4 | |
54 | */ | |
55 | typedef uint16_t le_uint16; | |
56 | ||
57 | /** | |
58 | * A type used for signed, 8-bit integers. | |
59 | * | |
60 | * @stable ICU 2.4 | |
61 | */ | |
62 | typedef int8_t le_int8; | |
63 | ||
64 | /** | |
65 | * A type used for unsigned, 8-bit integers. | |
66 | * | |
67 | * @stable ICU 2.4 | |
68 | */ | |
69 | typedef uint8_t le_uint8; | |
70 | ||
71 | ||
72 | /** | |
73 | * A type used for boolean values. | |
74 | * | |
75 | * @stable ICU 2.4 | |
76 | */ | |
77 | typedef UBool le_bool; | |
78 | ||
b75a7d8f A |
79 | #ifndef NULL |
80 | /** | |
81 | * Used to represent empty pointers. | |
82 | * | |
83 | * @stable ICU 2.4 | |
84 | */ | |
85 | #define NULL 0 | |
86 | #endif | |
87 | ||
88 | /** | |
89 | * Used for four character tags. | |
90 | * | |
91 | * @stable ICU 2.4 | |
92 | */ | |
93 | typedef le_uint32 LETag; | |
94 | ||
95 | /** | |
96 | * Used for 16-bit glyph indices as they're represented | |
97 | * in TrueType font tables. | |
98 | * | |
73c04bcf | 99 | * @stable ICU 3.2 |
b75a7d8f A |
100 | */ |
101 | typedef le_uint16 TTGlyphID; | |
102 | ||
103 | /** | |
104 | * Used for glyph indices. The low-order 16 bits are | |
105 | * the glyph ID within the font. The next 8 bits are | |
106 | * the sub-font ID within a compound font. The high- | |
107 | * order 8 bits are client defined. The LayoutEngine | |
108 | * will never change or look at the client defined bits. | |
109 | * | |
73c04bcf | 110 | * @stable ICU 3.2 |
b75a7d8f A |
111 | */ |
112 | typedef le_uint32 LEGlyphID; | |
113 | ||
114 | /** | |
115 | * Used to mask off the glyph ID part of an LEGlyphID. | |
116 | * | |
117 | * @see LEGlyphID | |
73c04bcf | 118 | * @stable ICU 3.2 |
b75a7d8f A |
119 | */ |
120 | #define LE_GLYPH_MASK 0x0000FFFF | |
121 | ||
122 | /** | |
123 | * Used to shift the glyph ID part of an LEGlyphID | |
124 | * into the low-order bits. | |
125 | * | |
126 | * @see LEGlyphID | |
73c04bcf | 127 | * @stable ICU 3.2 |
b75a7d8f A |
128 | */ |
129 | #define LE_GLYPH_SHIFT 0 | |
130 | ||
131 | ||
132 | /** | |
133 | * Used to mask off the sub-font ID part of an LEGlyphID. | |
134 | * | |
135 | * @see LEGlyphID | |
73c04bcf | 136 | * @stable ICU 3.2 |
b75a7d8f A |
137 | */ |
138 | #define LE_SUB_FONT_MASK 0x00FF0000 | |
139 | ||
140 | /** | |
141 | * Used to shift the sub-font ID part of an LEGlyphID | |
142 | * into the low-order bits. | |
143 | * | |
144 | * @see LEGlyphID | |
73c04bcf | 145 | * @stable ICU 3.2 |
b75a7d8f A |
146 | */ |
147 | #define LE_SUB_FONT_SHIFT 16 | |
148 | ||
149 | ||
150 | /** | |
151 | * Used to mask off the client-defined part of an LEGlyphID. | |
152 | * | |
153 | * @see LEGlyphID | |
73c04bcf | 154 | * @stable ICU 3.2 |
b75a7d8f A |
155 | */ |
156 | #define LE_CLIENT_MASK 0xFF000000 | |
157 | ||
158 | /** | |
159 | * Used to shift the sub-font ID part of an LEGlyphID | |
160 | * into the low-order bits. | |
161 | * | |
162 | * @see LEGlyphID | |
73c04bcf | 163 | * @stable ICU 3.2 |
b75a7d8f A |
164 | */ |
165 | #define LE_CLIENT_SHIFT 24 | |
166 | ||
167 | ||
168 | /** | |
169 | * A convenience macro to get the Glyph ID part of an LEGlyphID. | |
170 | * | |
171 | * @see LEGlyphID | |
73c04bcf | 172 | * @stable ICU 3.2 |
b75a7d8f A |
173 | */ |
174 | #define LE_GET_GLYPH(gid) ((gid & LE_GLYPH_MASK) >> LE_GLYPH_SHIFT) | |
175 | ||
176 | /** | |
177 | * A convenience macro to get the sub-font ID part of an LEGlyphID. | |
178 | * | |
179 | * @see LEGlyphID | |
73c04bcf | 180 | * @stable ICU 3.2 |
b75a7d8f A |
181 | */ |
182 | #define LE_GET_SUB_FONT(gid) ((gid & LE_SUB_FONT_MASK) >> LE_SUB_FONT_SHIFT) | |
183 | ||
184 | /** | |
185 | * A convenience macro to get the client-defined part of an LEGlyphID. | |
186 | * | |
187 | * @see LEGlyphID | |
73c04bcf | 188 | * @stable ICU 3.2 |
b75a7d8f A |
189 | */ |
190 | #define LE_GET_CLIENT(gid) ((gid & LE_CLIENT_MASK) >> LE_CLIENT_SHIFT) | |
191 | ||
192 | ||
193 | /** | |
194 | * A convenience macro to set the Glyph ID part of an LEGlyphID. | |
195 | * | |
196 | * @see LEGlyphID | |
73c04bcf | 197 | * @stable ICU 3.2 |
b75a7d8f A |
198 | */ |
199 | #define LE_SET_GLYPH(gid, glyph) ((gid & ~LE_GLYPH_MASK) | ((glyph << LE_GLYPH_SHIFT) & LE_GLYPH_MASK)) | |
200 | ||
201 | /** | |
202 | * A convenience macro to set the sub-font ID part of an LEGlyphID. | |
203 | * | |
204 | * @see LEGlyphID | |
73c04bcf | 205 | * @stable ICU 3.2 |
b75a7d8f A |
206 | */ |
207 | #define LE_SET_SUB_FONT(gid, font) ((gid & ~LE_SUB_FONT_MASK) | ((font << LE_SUB_FONT_SHIFT) & LE_SUB_FONT_MASK)) | |
208 | ||
209 | /** | |
210 | * A convenience macro to set the client-defined part of an LEGlyphID. | |
211 | * | |
212 | * @see LEGlyphID | |
73c04bcf | 213 | * @stable ICU 3.2 |
b75a7d8f A |
214 | */ |
215 | #define LE_SET_CLIENT(gid, client) ((gid & ~LE_CLIENT_MASK) | ((client << LE_CLIENT_SHIFT) & LE_CLIENT_MASK)) | |
216 | ||
217 | ||
218 | /** | |
219 | * Used to represent 16-bit Unicode code points. | |
220 | * | |
221 | * @stable ICU 2.4 | |
222 | */ | |
223 | typedef UChar LEUnicode16; | |
224 | ||
225 | /** | |
226 | * Used to represent 32-bit Unicode code points. | |
227 | * | |
228 | * @stable ICU 2.4 | |
229 | */ | |
230 | typedef UChar32 LEUnicode32; | |
231 | ||
232 | /** | |
233 | * Used to represent 16-bit Unicode code points. | |
234 | * | |
235 | * @deprecated since ICU 2.4. Use LEUnicode16 instead | |
236 | */ | |
237 | typedef UChar LEUnicode; | |
238 | ||
239 | /** | |
240 | * Used to hold a pair of (x, y) values which represent a point. | |
241 | * | |
242 | * @stable ICU 2.4 | |
243 | */ | |
244 | struct LEPoint | |
245 | { | |
246 | /** | |
247 | * The x coordinate of the point. | |
248 | * | |
249 | * @stable ICU 2.4 | |
250 | */ | |
251 | float fX; | |
252 | ||
253 | /** | |
254 | * The y coordinate of the point. | |
255 | * | |
256 | * @stable ICU 2.4 | |
257 | */ | |
258 | float fY; | |
259 | }; | |
260 | ||
261 | #ifndef XP_CPLUSPLUS | |
262 | /** | |
263 | * Used to hold a pair of (x, y) values which represent a point. | |
264 | * | |
265 | * @stable ICU 2.4 | |
266 | */ | |
267 | typedef struct LEPoint LEPoint; | |
268 | #endif | |
269 | ||
73c04bcf A |
270 | |
271 | /** | |
272 | * A convenience macro to get the length of an array. | |
273 | * | |
274 | * @internal | |
275 | */ | |
276 | #define LE_ARRAY_SIZE(array) (sizeof array / sizeof array[0]) | |
277 | ||
b75a7d8f A |
278 | #ifdef LE_USE_CMEMORY |
279 | /** | |
280 | * A convenience macro for copying an array. | |
281 | * | |
282 | * @internal | |
283 | */ | |
284 | #define LE_ARRAY_COPY(dst, src, count) uprv_memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0]) | |
285 | ||
286 | /** | |
287 | * Allocate an array of basic types. This is used to isolate the rest of | |
288 | * the LayoutEngine code from cmemory.h. | |
289 | * | |
290 | * @internal | |
291 | */ | |
292 | #define LE_NEW_ARRAY(type, count) (type *) uprv_malloc((count) * sizeof(type)) | |
293 | ||
294 | /** | |
295 | * Re-allocate an array of basic types. This is used to isolate the rest of | |
296 | * the LayoutEngine code from cmemory.h. | |
297 | * | |
298 | * @internal | |
299 | */ | |
300 | #define LE_GROW_ARRAY(array, newSize) uprv_realloc((void *) (array), (newSize) * sizeof (array)[0]) | |
301 | ||
302 | /** | |
303 | * Free an array of basic types. This is used to isolate the rest of | |
304 | * the LayoutEngine code from cmemory.h. | |
305 | * | |
306 | * @internal | |
307 | */ | |
308 | #define LE_DELETE_ARRAY(array) uprv_free((void *) (array)) | |
309 | #endif | |
310 | ||
311 | /** | |
312 | * A macro to construct the four-letter tags used to | |
313 | * label TrueType tables, and for script, language and | |
314 | * feature tags in OpenType tables. | |
315 | * | |
316 | * WARNING: THIS MACRO WILL ONLY WORK CORRECTLY IF | |
317 | * THE ARGUMENT CHARACTERS ARE ASCII. | |
318 | * | |
73c04bcf | 319 | * @stable ICU 3.2 |
b75a7d8f A |
320 | */ |
321 | #define LE_MAKE_TAG(a, b, c, d) \ | |
322 | (((le_uint32)(a) << 24) | \ | |
323 | ((le_uint32)(b) << 16) | \ | |
324 | ((le_uint32)(c) << 8) | \ | |
325 | (le_uint32)(d)) | |
326 | ||
327 | /** | |
328 | * This enumeration defines constants for the standard | |
329 | * TrueType, OpenType and AAT table tags. | |
330 | * | |
73c04bcf | 331 | * @stable ICU 3.2 |
b75a7d8f A |
332 | */ |
333 | enum LETableTags { | |
73c04bcf A |
334 | LE_ACNT_TABLE_TAG = 0x61636E74UL, /**< 'acnt' */ |
335 | LE_AVAR_TABLE_TAG = 0x61766172UL, /**< 'avar' */ | |
336 | LE_BASE_TABLE_TAG = 0x42415345UL, /**< 'BASE' */ | |
337 | LE_BDAT_TABLE_TAG = 0x62646174UL, /**< 'bdat' */ | |
338 | LE_BHED_TABLE_TAG = 0x62686564UL, /**< 'bhed' */ | |
339 | LE_BLOC_TABLE_TAG = 0x626C6F63UL, /**< 'bloc' */ | |
340 | LE_BSLN_TABLE_TAG = 0x62736C6EUL, /**< 'bsln' */ | |
341 | LE_CFF__TABLE_TAG = 0x43464620UL, /**< 'CFF ' */ | |
342 | LE_CMAP_TABLE_TAG = 0x636D6170UL, /**< 'cmap' */ | |
343 | LE_CVAR_TABLE_TAG = 0x63766172UL, /**< 'cvar' */ | |
344 | LE_CVT__TABLE_TAG = 0x63767420UL, /**< 'cvt ' */ | |
345 | LE_DSIG_TABLE_TAG = 0x44534947UL, /**< 'DSIG' */ | |
346 | LE_EBDT_TABLE_TAG = 0x45424454UL, /**< 'EBDT' */ | |
347 | LE_EBLC_TABLE_TAG = 0x45424C43UL, /**< 'EBLC' */ | |
348 | LE_EBSC_TABLE_TAG = 0x45425343UL, /**< 'EBSC' */ | |
349 | LE_FDSC_TABLE_TAG = 0x66647363UL, /**< 'fdsc' */ | |
350 | LE_FEAT_TABLE_TAG = 0x66656174UL, /**< 'feat' */ | |
351 | LE_FMTX_TABLE_TAG = 0x666D7478UL, /**< 'fmtx' */ | |
352 | LE_FPGM_TABLE_TAG = 0x6670676DUL, /**< 'fpgm' */ | |
353 | LE_FVAR_TABLE_TAG = 0x66766172UL, /**< 'fvar' */ | |
354 | LE_GASP_TABLE_TAG = 0x67617370UL, /**< 'gasp' */ | |
355 | LE_GDEF_TABLE_TAG = 0x47444546UL, /**< 'GDEF' */ | |
356 | LE_GLYF_TABLE_TAG = 0x676C7966UL, /**< 'glyf' */ | |
357 | LE_GPOS_TABLE_TAG = 0x47504F53UL, /**< 'GPOS' */ | |
358 | LE_GSUB_TABLE_TAG = 0x47535542UL, /**< 'GSUB' */ | |
359 | LE_GVAR_TABLE_TAG = 0x67766172UL, /**< 'gvar' */ | |
360 | LE_HDMX_TABLE_TAG = 0x68646D78UL, /**< 'hdmx' */ | |
361 | LE_HEAD_TABLE_TAG = 0x68656164UL, /**< 'head' */ | |
362 | LE_HHEA_TABLE_TAG = 0x68686561UL, /**< 'hhea' */ | |
363 | LE_HMTX_TABLE_TAG = 0x686D7478UL, /**< 'hmtx' */ | |
364 | LE_HSTY_TABLE_TAG = 0x68737479UL, /**< 'hsty' */ | |
365 | LE_JUST_TABLE_TAG = 0x6A757374UL, /**< 'just' */ | |
366 | LE_JSTF_TABLE_TAG = 0x4A535446UL, /**< 'JSTF' */ | |
367 | LE_KERN_TABLE_TAG = 0x6B65726EUL, /**< 'kern' */ | |
368 | LE_LCAR_TABLE_TAG = 0x6C636172UL, /**< 'lcar' */ | |
369 | LE_LOCA_TABLE_TAG = 0x6C6F6361UL, /**< 'loca' */ | |
370 | LE_LTSH_TABLE_TAG = 0x4C545348UL, /**< 'LTSH' */ | |
371 | LE_MAXP_TABLE_TAG = 0x6D617870UL, /**< 'maxp' */ | |
372 | LE_MORT_TABLE_TAG = 0x6D6F7274UL, /**< 'mort' */ | |
373 | LE_MORX_TABLE_TAG = 0x6D6F7278UL, /**< 'morx' */ | |
374 | LE_NAME_TABLE_TAG = 0x6E616D65UL, /**< 'name' */ | |
375 | LE_OPBD_TABLE_TAG = 0x6F706264UL, /**< 'opbd' */ | |
376 | LE_OS_2_TABLE_TAG = 0x4F532F32UL, /**< 'OS/2' */ | |
377 | LE_PCLT_TABLE_TAG = 0x50434C54UL, /**< 'PCLT' */ | |
378 | LE_POST_TABLE_TAG = 0x706F7374UL, /**< 'post' */ | |
379 | LE_PREP_TABLE_TAG = 0x70726570UL, /**< 'prep' */ | |
380 | LE_PROP_TABLE_TAG = 0x70726F70UL, /**< 'prop' */ | |
381 | LE_TRAK_TABLE_TAG = 0x7472616BUL, /**< 'trak' */ | |
382 | LE_VDMX_TABLE_TAG = 0x56444D58UL, /**< 'VDMX' */ | |
383 | LE_VHEA_TABLE_TAG = 0x76686561UL, /**< 'vhea' */ | |
384 | LE_VMTX_TABLE_TAG = 0x766D7478UL, /**< 'vmtx' */ | |
385 | LE_VORG_TABLE_TAG = 0x564F5247UL, /**< 'VORG' */ | |
386 | LE_ZAPF_TABLE_TAG = 0x5A617066UL /**< 'Zapf' */ | |
b75a7d8f A |
387 | }; |
388 | ||
389 | /** | |
390 | * This enumeration defines constants for all | |
391 | * the common OpenType feature tags. | |
392 | * | |
73c04bcf | 393 | * @stable ICU 3.2 |
b75a7d8f A |
394 | */ |
395 | enum LEFeatureTags { | |
73c04bcf A |
396 | LE_AALT_FEATURE_TAG = 0x61616C74UL, /**< 'aalt' */ |
397 | LE_ABVF_FEATURE_TAG = 0x61627666UL, /**< 'abvf' */ | |
398 | LE_ABVM_FEATURE_TAG = 0x6162766DUL, /**< 'abvm' */ | |
399 | LE_ABVS_FEATURE_TAG = 0x61627673UL, /**< 'abvs' */ | |
400 | LE_AFRC_FEATURE_TAG = 0x61667263UL, /**< 'afrc' */ | |
401 | LE_AKHN_FEATURE_TAG = 0x616B686EUL, /**< 'akhn' */ | |
402 | LE_BLWF_FEATURE_TAG = 0x626C7766UL, /**< 'blwf' */ | |
403 | LE_BLWM_FEATURE_TAG = 0x626C776DUL, /**< 'blwm' */ | |
404 | LE_BLWS_FEATURE_TAG = 0x626C7773UL, /**< 'blws' */ | |
405 | LE_CALT_FEATURE_TAG = 0x63616C74UL, /**< 'calt' */ | |
406 | LE_CASE_FEATURE_TAG = 0x63617365UL, /**< 'case' */ | |
407 | LE_CCMP_FEATURE_TAG = 0x63636D70UL, /**< 'ccmp' */ | |
729e4ab9 | 408 | LE_CJCT_FEATURE_TAG = 0x636A6374UL, /**< 'cjct' */ |
73c04bcf A |
409 | LE_CLIG_FEATURE_TAG = 0x636C6967UL, /**< 'clig' */ |
410 | LE_CPSP_FEATURE_TAG = 0x63707370UL, /**< 'cpsp' */ | |
411 | LE_CSWH_FEATURE_TAG = 0x63737768UL, /**< 'cswh' */ | |
412 | LE_CURS_FEATURE_TAG = 0x63757273UL, /**< 'curs' */ | |
413 | LE_C2SC_FEATURE_TAG = 0x63327363UL, /**< 'c2sc' */ | |
414 | LE_C2PC_FEATURE_TAG = 0x63327063UL, /**< 'c2pc' */ | |
415 | LE_DIST_FEATURE_TAG = 0x64697374UL, /**< 'dist' */ | |
416 | LE_DLIG_FEATURE_TAG = 0x646C6967UL, /**< 'dlig' */ | |
417 | LE_DNOM_FEATURE_TAG = 0x646E6F6DUL, /**< 'dnom' */ | |
418 | LE_EXPT_FEATURE_TAG = 0x65787074UL, /**< 'expt' */ | |
419 | LE_FALT_FEATURE_TAG = 0x66616C74UL, /**< 'falt' */ | |
420 | LE_FIN2_FEATURE_TAG = 0x66696E32UL, /**< 'fin2' */ | |
421 | LE_FIN3_FEATURE_TAG = 0x66696E33UL, /**< 'fin3' */ | |
422 | LE_FINA_FEATURE_TAG = 0x66696E61UL, /**< 'fina' */ | |
423 | LE_FRAC_FEATURE_TAG = 0x66726163UL, /**< 'frac' */ | |
424 | LE_FWID_FEATURE_TAG = 0x66776964UL, /**< 'fwid' */ | |
425 | LE_HALF_FEATURE_TAG = 0x68616C66UL, /**< 'half' */ | |
426 | LE_HALN_FEATURE_TAG = 0x68616C6EUL, /**< 'haln' */ | |
427 | LE_HALT_FEATURE_TAG = 0x68616C74UL, /**< 'halt' */ | |
428 | LE_HIST_FEATURE_TAG = 0x68697374UL, /**< 'hist' */ | |
429 | LE_HKNA_FEATURE_TAG = 0x686B6E61UL, /**< 'hkna' */ | |
430 | LE_HLIG_FEATURE_TAG = 0x686C6967UL, /**< 'hlig' */ | |
431 | LE_HNGL_FEATURE_TAG = 0x686E676CUL, /**< 'hngl' */ | |
432 | LE_HWID_FEATURE_TAG = 0x68776964UL, /**< 'hwid' */ | |
433 | LE_INIT_FEATURE_TAG = 0x696E6974UL, /**< 'init' */ | |
434 | LE_ISOL_FEATURE_TAG = 0x69736F6CUL, /**< 'isol' */ | |
435 | LE_ITAL_FEATURE_TAG = 0x6974616CUL, /**< 'ital' */ | |
436 | LE_JALT_FEATURE_TAG = 0x6A616C74UL, /**< 'jalt' */ | |
437 | LE_JP78_FEATURE_TAG = 0x6A703738UL, /**< 'jp78' */ | |
438 | LE_JP83_FEATURE_TAG = 0x6A703833UL, /**< 'jp83' */ | |
439 | LE_JP90_FEATURE_TAG = 0x6A703930UL, /**< 'jp90' */ | |
440 | LE_KERN_FEATURE_TAG = 0x6B65726EUL, /**< 'kern' */ | |
441 | LE_LFBD_FEATURE_TAG = 0x6C666264UL, /**< 'lfbd' */ | |
442 | LE_LIGA_FEATURE_TAG = 0x6C696761UL, /**< 'liga' */ | |
443 | LE_LJMO_FEATURE_TAG = 0x6C6A6D6FUL, /**< 'ljmo' */ | |
444 | LE_LNUM_FEATURE_TAG = 0x6C6E756DUL, /**< 'lnum' */ | |
445 | LE_LOCL_FEATURE_TAG = 0x6C6F636CUL, /**< 'locl' */ | |
446 | LE_MARK_FEATURE_TAG = 0x6D61726BUL, /**< 'mark' */ | |
447 | LE_MED2_FEATURE_TAG = 0x6D656432UL, /**< 'med2' */ | |
448 | LE_MEDI_FEATURE_TAG = 0x6D656469UL, /**< 'medi' */ | |
449 | LE_MGRK_FEATURE_TAG = 0x6D67726BUL, /**< 'mgrk' */ | |
450 | LE_MKMK_FEATURE_TAG = 0x6D6B6D6BUL, /**< 'mkmk' */ | |
451 | LE_MSET_FEATURE_TAG = 0x6D736574UL, /**< 'mset' */ | |
452 | LE_NALT_FEATURE_TAG = 0x6E616C74UL, /**< 'nalt' */ | |
453 | LE_NLCK_FEATURE_TAG = 0x6E6C636BUL, /**< 'nlck' */ | |
454 | LE_NUKT_FEATURE_TAG = 0x6E756B74UL, /**< 'nukt' */ | |
455 | LE_NUMR_FEATURE_TAG = 0x6E756D72UL, /**< 'numr' */ | |
456 | LE_ONUM_FEATURE_TAG = 0x6F6E756DUL, /**< 'onum' */ | |
457 | LE_OPBD_FEATURE_TAG = 0x6F706264UL, /**< 'opbd' */ | |
458 | LE_ORDN_FEATURE_TAG = 0x6F72646EUL, /**< 'ordn' */ | |
459 | LE_ORNM_FEATURE_TAG = 0x6F726E6DUL, /**< 'ornm' */ | |
460 | LE_PALT_FEATURE_TAG = 0x70616C74UL, /**< 'palt' */ | |
461 | LE_PCAP_FEATURE_TAG = 0x70636170UL, /**< 'pcap' */ | |
462 | LE_PNUM_FEATURE_TAG = 0x706E756DUL, /**< 'pnum' */ | |
463 | LE_PREF_FEATURE_TAG = 0x70726566UL, /**< 'pref' */ | |
464 | LE_PRES_FEATURE_TAG = 0x70726573UL, /**< 'pres' */ | |
465 | LE_PSTF_FEATURE_TAG = 0x70737466UL, /**< 'pstf' */ | |
466 | LE_PSTS_FEATURE_TAG = 0x70737473UL, /**< 'psts' */ | |
467 | LE_PWID_FEATURE_TAG = 0x70776964UL, /**< 'pwid' */ | |
468 | LE_QWID_FEATURE_TAG = 0x71776964UL, /**< 'qwid' */ | |
469 | LE_RAND_FEATURE_TAG = 0x72616E64UL, /**< 'rand' */ | |
470 | LE_RLIG_FEATURE_TAG = 0x726C6967UL, /**< 'rlig' */ | |
471 | LE_RPHF_FEATURE_TAG = 0x72706866UL, /**< 'rphf' */ | |
729e4ab9 | 472 | LE_RKRF_FEATURE_TAG = 0x726B7266UL, /**< 'rkrf' */ |
73c04bcf A |
473 | LE_RTBD_FEATURE_TAG = 0x72746264UL, /**< 'rtbd' */ |
474 | LE_RTLA_FEATURE_TAG = 0x72746C61UL, /**< 'rtla' */ | |
475 | LE_RUBY_FEATURE_TAG = 0x72756279UL, /**< 'ruby' */ | |
476 | LE_SALT_FEATURE_TAG = 0x73616C74UL, /**< 'salt' */ | |
477 | LE_SINF_FEATURE_TAG = 0x73696E66UL, /**< 'sinf' */ | |
478 | LE_SIZE_FEATURE_TAG = 0x73697A65UL, /**< 'size' */ | |
479 | LE_SMCP_FEATURE_TAG = 0x736D6370UL, /**< 'smcp' */ | |
480 | LE_SMPL_FEATURE_TAG = 0x736D706CUL, /**< 'smpl' */ | |
481 | LE_SS01_FEATURE_TAG = 0x73733031UL, /**< 'ss01' */ | |
482 | LE_SS02_FEATURE_TAG = 0x73733032UL, /**< 'ss02' */ | |
483 | LE_SS03_FEATURE_TAG = 0x73733033UL, /**< 'ss03' */ | |
484 | LE_SS04_FEATURE_TAG = 0x73733034UL, /**< 'ss04' */ | |
485 | LE_SS05_FEATURE_TAG = 0x73733035UL, /**< 'ss05' */ | |
486 | LE_SS06_FEATURE_TAG = 0x73733036UL, /**< 'ss06' */ | |
487 | LE_SS07_FEATURE_TAG = 0x73733037UL, /**< 'ss07' */ | |
488 | LE_SS08_FEATURE_TAG = 0x73733038UL, /**< 'ss08' */ | |
489 | LE_SS09_FEATURE_TAG = 0x73733039UL, /**< 'ss09' */ | |
490 | LE_SS10_FEATURE_TAG = 0x73733130UL, /**< 'ss10' */ | |
491 | LE_SS11_FEATURE_TAG = 0x73733131UL, /**< 'ss11' */ | |
492 | LE_SS12_FEATURE_TAG = 0x73733132UL, /**< 'ss12' */ | |
493 | LE_SS13_FEATURE_TAG = 0x73733133UL, /**< 'ss13' */ | |
494 | LE_SS14_FEATURE_TAG = 0x73733134UL, /**< 'ss14' */ | |
495 | LE_SS15_FEATURE_TAG = 0x73733135UL, /**< 'ss15' */ | |
496 | LE_SS16_FEATURE_TAG = 0x73733136UL, /**< 'ss16' */ | |
497 | LE_SS17_FEATURE_TAG = 0x73733137UL, /**< 'ss17' */ | |
498 | LE_SS18_FEATURE_TAG = 0x73733138UL, /**< 'ss18' */ | |
499 | LE_SS19_FEATURE_TAG = 0x73733139UL, /**< 'ss19' */ | |
500 | LE_SS20_FEATURE_TAG = 0x73733230UL, /**< 'ss20' */ | |
501 | LE_SUBS_FEATURE_TAG = 0x73756273UL, /**< 'subs' */ | |
502 | LE_SUPS_FEATURE_TAG = 0x73757073UL, /**< 'sups' */ | |
503 | LE_SWSH_FEATURE_TAG = 0x73777368UL, /**< 'swsh' */ | |
504 | LE_TITL_FEATURE_TAG = 0x7469746CUL, /**< 'titl' */ | |
505 | LE_TJMO_FEATURE_TAG = 0x746A6D6FUL, /**< 'tjmo' */ | |
506 | LE_TNAM_FEATURE_TAG = 0x746E616DUL, /**< 'tnam' */ | |
507 | LE_TNUM_FEATURE_TAG = 0x746E756DUL, /**< 'tnum' */ | |
508 | LE_TRAD_FEATURE_TAG = 0x74726164UL, /**< 'trad' */ | |
509 | LE_TWID_FEATURE_TAG = 0x74776964UL, /**< 'twid' */ | |
510 | LE_UNIC_FEATURE_TAG = 0x756E6963UL, /**< 'unic' */ | |
511 | LE_VALT_FEATURE_TAG = 0x76616C74UL, /**< 'valt' */ | |
512 | LE_VATU_FEATURE_TAG = 0x76617475UL, /**< 'vatu' */ | |
513 | LE_VERT_FEATURE_TAG = 0x76657274UL, /**< 'vert' */ | |
514 | LE_VHAL_FEATURE_TAG = 0x7668616CUL, /**< 'vhal' */ | |
515 | LE_VJMO_FEATURE_TAG = 0x766A6D6FUL, /**< 'vjmo' */ | |
516 | LE_VKNA_FEATURE_TAG = 0x766B6E61UL, /**< 'vkna' */ | |
517 | LE_VKRN_FEATURE_TAG = 0x766B726EUL, /**< 'vkrn' */ | |
518 | LE_VPAL_FEATURE_TAG = 0x7670616CUL, /**< 'vpal' */ | |
519 | LE_VRT2_FEATURE_TAG = 0x76727432UL, /**< 'vrt2' */ | |
520 | LE_ZERO_FEATURE_TAG = 0x7A65726FUL /**< 'zero' */ | |
b75a7d8f A |
521 | }; |
522 | ||
523 | /** | |
524 | * Error codes returned by the LayoutEngine. | |
525 | * | |
526 | * @stable ICU 2.4 | |
527 | */ | |
528 | enum LEErrorCode { | |
529 | /* informational */ | |
73c04bcf | 530 | LE_NO_SUBFONT_WARNING = U_USING_DEFAULT_WARNING, /**< The font does not contain subfonts. */ |
b75a7d8f A |
531 | |
532 | /* success */ | |
73c04bcf | 533 | LE_NO_ERROR = U_ZERO_ERROR, /**< No error, no warning. */ |
b75a7d8f A |
534 | |
535 | /* failures */ | |
73c04bcf A |
536 | LE_ILLEGAL_ARGUMENT_ERROR = U_ILLEGAL_ARGUMENT_ERROR, /**< An illegal argument was detected. */ |
537 | LE_MEMORY_ALLOCATION_ERROR = U_MEMORY_ALLOCATION_ERROR, /**< Memory allocation error. */ | |
538 | LE_INDEX_OUT_OF_BOUNDS_ERROR = U_INDEX_OUTOFBOUNDS_ERROR, /**< Trying to access an index that is out of bounds. */ | |
539 | LE_NO_LAYOUT_ERROR = U_UNSUPPORTED_ERROR, /**< You must call layoutChars() first. */ | |
540 | LE_INTERNAL_ERROR = U_INTERNAL_PROGRAM_ERROR, /**< An internal error was encountered. */ | |
541 | LE_FONT_FILE_NOT_FOUND_ERROR = U_FILE_ACCESS_ERROR, /**< The requested font file cannot be opened. */ | |
542 | LE_MISSING_FONT_TABLE_ERROR = U_MISSING_RESOURCE_ERROR /**< The requested font table does not exist. */ | |
b75a7d8f A |
543 | }; |
544 | ||
545 | #ifndef XP_CPLUSPLUS | |
546 | /** | |
547 | * Error codes returned by the LayoutEngine. | |
548 | * | |
549 | * @stable ICU 2.4 | |
550 | */ | |
551 | typedef enum LEErrorCode LEErrorCode; | |
552 | #endif | |
553 | ||
554 | /** | |
555 | * A convenience macro to test for the success of a LayoutEngine call. | |
556 | * | |
557 | * @stable ICU 2.4 | |
558 | */ | |
559 | #define LE_SUCCESS(code) (U_SUCCESS((UErrorCode)code)) | |
560 | ||
561 | /** | |
562 | * A convenience macro to test for the failure of a LayoutEngine call. | |
563 | * | |
564 | * @stable ICU 2.4 | |
565 | */ | |
566 | #define LE_FAILURE(code) (U_FAILURE((UErrorCode)code)) | |
567 | ||
b75a7d8f | 568 | #endif |