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