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