Logo Search packages:      
Sourcecode: icu version File versions  Download package

LETypes.h

Go to the documentation of this file.
/*
 *
 * (C) Copyright IBM Corp. 1998-2009 - All Rights Reserved
 *
 */

#ifndef __LETYPES_H
#define __LETYPES_H

#if !defined(LE_USE_CMEMORY) && (defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_STATIC_IMPLEMENTATION) || defined(U_COMBINED_IMPLEMENTATION))
#define LE_USE_CMEMORY
#endif

#include "unicode/utypes.h"

#ifdef XP_CPLUSPLUS
#include "unicode/uobject.h"
#endif

#ifdef LE_USE_CMEMORY
#include "cmemory.h"
#endif

/*!
 * \file
 * \brief C API: Basic definitions for the ICU LayoutEngine
 */

/**
 * A type used for signed, 32-bit integers.
 *
 * @stable ICU 2.4
 */
00034 typedef int32_t le_int32;

/**
 * A type used for unsigned, 32-bit integers.
 *
 * @stable ICU 2.4
 */
00041 typedef uint32_t le_uint32;

/**
 * A type used for signed, 16-bit integers.
 *
 * @stable ICU 2.4
 */
00048 typedef int16_t le_int16;

/**
 * A type used for unsigned, 16-bit integers.
 *
 * @stable ICU 2.4
 */
00055 typedef uint16_t le_uint16;

/**
 * A type used for signed, 8-bit integers.
 *
 * @stable ICU 2.4
 */
00062 typedef int8_t le_int8;

/**
 * A type used for unsigned, 8-bit integers.
 *
 * @stable ICU 2.4
 */
00069 typedef uint8_t le_uint8;


/**
 * A type used for boolean values.
 *
 * @stable ICU 2.4
 */
00077 typedef UBool le_bool;

#ifndef NULL
/**
 * Used to represent empty pointers.
 *
 * @stable ICU 2.4
 */
00085 #define NULL 0
#endif

/**
 * Used for four character tags.
 *
 * @stable ICU 2.4
 */
00093 typedef le_uint32 LETag;

/**
 * Used for 16-bit glyph indices as they're represented
 * in TrueType font tables.
 *
 * @stable ICU 3.2
 */
00101 typedef le_uint16 TTGlyphID;

/**
 * Used for glyph indices. The low-order 16 bits are
 * the glyph ID within the font. The next 8 bits are
 * the sub-font ID within a compound font. The high-
 * order 8 bits are client defined. The LayoutEngine
 * will never change or look at the client defined bits.
 *
 * @stable ICU 3.2
 */
00112 typedef le_uint32 LEGlyphID;

/**
 * Used to mask off the glyph ID part of an LEGlyphID.
 *
 * @see LEGlyphID
 * @stable ICU 3.2
 */
00120 #define LE_GLYPH_MASK     0x0000FFFF

/**
 * Used to shift the glyph ID part of an LEGlyphID
 * into the low-order bits.
 *
 * @see LEGlyphID
 * @stable ICU 3.2
 */
00129 #define LE_GLYPH_SHIFT    0


/**
 * Used to mask off the sub-font ID part of an LEGlyphID.
 *
 * @see LEGlyphID
 * @stable ICU 3.2
 */
00138 #define LE_SUB_FONT_MASK  0x00FF0000

/**
 * Used to shift the sub-font ID part of an LEGlyphID
 * into the low-order bits.
 *
 * @see LEGlyphID
 * @stable ICU 3.2
 */
00147 #define LE_SUB_FONT_SHIFT 16


/**
 * Used to mask off the client-defined part of an LEGlyphID.
 *
 * @see LEGlyphID
 * @stable ICU 3.2
 */
00156 #define LE_CLIENT_MASK    0xFF000000

/**
 * Used to shift the sub-font ID part of an LEGlyphID
 * into the low-order bits.
 *
 * @see LEGlyphID
 * @stable ICU 3.2
 */
00165 #define LE_CLIENT_SHIFT   24


/**
 * A convenience macro to get the Glyph ID part of an LEGlyphID.
 *
 * @see LEGlyphID
 * @stable ICU 3.2
 */
00174 #define LE_GET_GLYPH(gid) ((gid & LE_GLYPH_MASK) >> LE_GLYPH_SHIFT)

/**
 * A convenience macro to get the sub-font ID part of an LEGlyphID.
 *
 * @see LEGlyphID
 * @stable ICU 3.2
 */
00182 #define LE_GET_SUB_FONT(gid) ((gid & LE_SUB_FONT_MASK) >> LE_SUB_FONT_SHIFT)

/**
 * A convenience macro to get the client-defined part of an LEGlyphID.
 *
 * @see LEGlyphID
 * @stable ICU 3.2
 */
00190 #define LE_GET_CLIENT(gid) ((gid & LE_CLIENT_MASK) >> LE_CLIENT_SHIFT)


/**
 * A convenience macro to set the Glyph ID part of an LEGlyphID.
 *
 * @see LEGlyphID
 * @stable ICU 3.2
 */
00199 #define LE_SET_GLYPH(gid, glyph) ((gid & ~LE_GLYPH_MASK) | ((glyph << LE_GLYPH_SHIFT) & LE_GLYPH_MASK))

/**
 * A convenience macro to set the sub-font ID part of an LEGlyphID.
 *
 * @see LEGlyphID
 * @stable ICU 3.2
 */
00207 #define LE_SET_SUB_FONT(gid, font) ((gid & ~LE_SUB_FONT_MASK) | ((font << LE_SUB_FONT_SHIFT) & LE_SUB_FONT_MASK))

/**
 * A convenience macro to set the client-defined part of an LEGlyphID.
 *
 * @see LEGlyphID
 * @stable ICU 3.2
 */
00215 #define LE_SET_CLIENT(gid, client) ((gid & ~LE_CLIENT_MASK) | ((client << LE_CLIENT_SHIFT) & LE_CLIENT_MASK))


/**
 * Used to represent 16-bit Unicode code points.
 *
 * @stable ICU 2.4
 */
00223 typedef UChar LEUnicode16;

/**
 * Used to represent 32-bit Unicode code points.
 *
 * @stable ICU 2.4
 */
00230 typedef UChar32 LEUnicode32;

/**
 * Used to represent 16-bit Unicode code points.
 *
 * @deprecated since ICU 2.4. Use LEUnicode16 instead
 */
00237 typedef UChar LEUnicode;

/**
 * Used to hold a pair of (x, y) values which represent a point.
 *
 * @stable ICU 2.4
 */
00244 struct LEPoint
{
    /**
     * The x coordinate of the point.
     *
     * @stable ICU 2.4
     */
00251     float fX;

    /**
     * The y coordinate of the point.
     *
     * @stable ICU 2.4
     */
00258     float fY;
};

#ifndef XP_CPLUSPLUS
/**
 * Used to hold a pair of (x, y) values which represent a point.
 *
 * @stable ICU 2.4
 */
00267 typedef struct LEPoint LEPoint;
#endif


/**
 * A convenience macro to get the length of an array.
 *
 * @internal
 */
00276 #define LE_ARRAY_SIZE(array) (sizeof array / sizeof array[0])

#ifdef LE_USE_CMEMORY
/**
 * A convenience macro for copying an array.
 *
 * @internal
 */
#define LE_ARRAY_COPY(dst, src, count) uprv_memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])

/**
 * Allocate an array of basic types. This is used to isolate the rest of
 * the LayoutEngine code from cmemory.h.
 *
 * @internal
 */
#define LE_NEW_ARRAY(type, count) (type *) uprv_malloc((count) * sizeof(type))

/**
 * Re-allocate an array of basic types. This is used to isolate the rest of
 * the LayoutEngine code from cmemory.h.
 *
 * @internal
 */
#define LE_GROW_ARRAY(array, newSize) uprv_realloc((void *) (array), (newSize) * sizeof (array)[0])

 /**
 * Free an array of basic types. This is used to isolate the rest of
 * the LayoutEngine code from cmemory.h.
 *
 * @internal
 */
#define LE_DELETE_ARRAY(array) uprv_free((void *) (array))
#endif

/**
 * A macro to construct the four-letter tags used to
 * label TrueType tables, and for script, language and
 * feature tags in OpenType tables.
 *
 * WARNING: THIS MACRO WILL ONLY WORK CORRECTLY IF
 * THE ARGUMENT CHARACTERS ARE ASCII.
 *
 * @stable ICU 3.2
 */
00321 #define LE_MAKE_TAG(a, b, c, d) \
    (((le_uint32)(a) << 24) |   \
     ((le_uint32)(b) << 16) |   \
     ((le_uint32)(c) << 8)  |   \
      (le_uint32)(d))

/**
 * This enumeration defines constants for the standard
 * TrueType, OpenType and AAT table tags.
 *
 * @stable ICU 3.2
 */
00333 enum LETableTags {
00334     LE_ACNT_TABLE_TAG = 0x61636E74UL, /**< 'acnt' */
00335     LE_AVAR_TABLE_TAG = 0x61766172UL, /**< 'avar' */
00336     LE_BASE_TABLE_TAG = 0x42415345UL, /**< 'BASE' */
00337     LE_BDAT_TABLE_TAG = 0x62646174UL, /**< 'bdat' */
00338     LE_BHED_TABLE_TAG = 0x62686564UL, /**< 'bhed' */
00339     LE_BLOC_TABLE_TAG = 0x626C6F63UL, /**< 'bloc' */
00340     LE_BSLN_TABLE_TAG = 0x62736C6EUL, /**< 'bsln' */
00341     LE_CFF__TABLE_TAG = 0x43464620UL, /**< 'CFF ' */
00342     LE_CMAP_TABLE_TAG = 0x636D6170UL, /**< 'cmap' */
00343     LE_CVAR_TABLE_TAG = 0x63766172UL, /**< 'cvar' */
00344     LE_CVT__TABLE_TAG = 0x63767420UL, /**< 'cvt ' */
00345     LE_DSIG_TABLE_TAG = 0x44534947UL, /**< 'DSIG' */
00346     LE_EBDT_TABLE_TAG = 0x45424454UL, /**< 'EBDT' */
00347     LE_EBLC_TABLE_TAG = 0x45424C43UL, /**< 'EBLC' */
00348     LE_EBSC_TABLE_TAG = 0x45425343UL, /**< 'EBSC' */
00349     LE_FDSC_TABLE_TAG = 0x66647363UL, /**< 'fdsc' */
00350     LE_FEAT_TABLE_TAG = 0x66656174UL, /**< 'feat' */
00351     LE_FMTX_TABLE_TAG = 0x666D7478UL, /**< 'fmtx' */
00352     LE_FPGM_TABLE_TAG = 0x6670676DUL, /**< 'fpgm' */
00353     LE_FVAR_TABLE_TAG = 0x66766172UL, /**< 'fvar' */
00354     LE_GASP_TABLE_TAG = 0x67617370UL, /**< 'gasp' */
00355     LE_GDEF_TABLE_TAG = 0x47444546UL, /**< 'GDEF' */
00356     LE_GLYF_TABLE_TAG = 0x676C7966UL, /**< 'glyf' */
00357     LE_GPOS_TABLE_TAG = 0x47504F53UL, /**< 'GPOS' */
00358     LE_GSUB_TABLE_TAG = 0x47535542UL, /**< 'GSUB' */
00359     LE_GVAR_TABLE_TAG = 0x67766172UL, /**< 'gvar' */
00360     LE_HDMX_TABLE_TAG = 0x68646D78UL, /**< 'hdmx' */
00361     LE_HEAD_TABLE_TAG = 0x68656164UL, /**< 'head' */
00362     LE_HHEA_TABLE_TAG = 0x68686561UL, /**< 'hhea' */
00363     LE_HMTX_TABLE_TAG = 0x686D7478UL, /**< 'hmtx' */
00364     LE_HSTY_TABLE_TAG = 0x68737479UL, /**< 'hsty' */
00365     LE_JUST_TABLE_TAG = 0x6A757374UL, /**< 'just' */
00366     LE_JSTF_TABLE_TAG = 0x4A535446UL, /**< 'JSTF' */
00367     LE_KERN_TABLE_TAG = 0x6B65726EUL, /**< 'kern' */
00368     LE_LCAR_TABLE_TAG = 0x6C636172UL, /**< 'lcar' */
00369     LE_LOCA_TABLE_TAG = 0x6C6F6361UL, /**< 'loca' */
00370     LE_LTSH_TABLE_TAG = 0x4C545348UL, /**< 'LTSH' */
00371     LE_MAXP_TABLE_TAG = 0x6D617870UL, /**< 'maxp' */
00372     LE_MORT_TABLE_TAG = 0x6D6F7274UL, /**< 'mort' */
00373     LE_MORX_TABLE_TAG = 0x6D6F7278UL, /**< 'morx' */
00374     LE_NAME_TABLE_TAG = 0x6E616D65UL, /**< 'name' */
00375     LE_OPBD_TABLE_TAG = 0x6F706264UL, /**< 'opbd' */
00376     LE_OS_2_TABLE_TAG = 0x4F532F32UL, /**< 'OS/2' */
00377     LE_PCLT_TABLE_TAG = 0x50434C54UL, /**< 'PCLT' */
00378     LE_POST_TABLE_TAG = 0x706F7374UL, /**< 'post' */
00379     LE_PREP_TABLE_TAG = 0x70726570UL, /**< 'prep' */
00380     LE_PROP_TABLE_TAG = 0x70726F70UL, /**< 'prop' */
00381     LE_TRAK_TABLE_TAG = 0x7472616BUL, /**< 'trak' */
00382     LE_VDMX_TABLE_TAG = 0x56444D58UL, /**< 'VDMX' */
00383     LE_VHEA_TABLE_TAG = 0x76686561UL, /**< 'vhea' */
00384     LE_VMTX_TABLE_TAG = 0x766D7478UL, /**< 'vmtx' */
00385     LE_VORG_TABLE_TAG = 0x564F5247UL, /**< 'VORG' */
00386     LE_ZAPF_TABLE_TAG = 0x5A617066UL  /**< 'Zapf' */
};

/**
 * This enumeration defines constants for all
 * the common OpenType feature tags.
 *
 * @stable ICU 3.2
 */
00395 enum LEFeatureTags {
00396     LE_AALT_FEATURE_TAG = 0x61616C74UL, /**< 'aalt' */
00397     LE_ABVF_FEATURE_TAG = 0x61627666UL, /**< 'abvf' */
00398     LE_ABVM_FEATURE_TAG = 0x6162766DUL, /**< 'abvm' */
00399     LE_ABVS_FEATURE_TAG = 0x61627673UL, /**< 'abvs' */
00400     LE_AFRC_FEATURE_TAG = 0x61667263UL, /**< 'afrc' */
00401     LE_AKHN_FEATURE_TAG = 0x616B686EUL, /**< 'akhn' */
00402     LE_BLWF_FEATURE_TAG = 0x626C7766UL, /**< 'blwf' */
00403     LE_BLWM_FEATURE_TAG = 0x626C776DUL, /**< 'blwm' */
00404     LE_BLWS_FEATURE_TAG = 0x626C7773UL, /**< 'blws' */
00405     LE_CALT_FEATURE_TAG = 0x63616C74UL, /**< 'calt' */
00406     LE_CASE_FEATURE_TAG = 0x63617365UL, /**< 'case' */
00407     LE_CCMP_FEATURE_TAG = 0x63636D70UL, /**< 'ccmp' */
00408       LE_CJCT_FEATURE_TAG = 0x636A6374UL, /**< 'cjct' */
00409     LE_CLIG_FEATURE_TAG = 0x636C6967UL, /**< 'clig' */
00410     LE_CPSP_FEATURE_TAG = 0x63707370UL, /**< 'cpsp' */
00411     LE_CSWH_FEATURE_TAG = 0x63737768UL, /**< 'cswh' */
00412     LE_CURS_FEATURE_TAG = 0x63757273UL, /**< 'curs' */
00413     LE_C2SC_FEATURE_TAG = 0x63327363UL, /**< 'c2sc' */
00414     LE_C2PC_FEATURE_TAG = 0x63327063UL, /**< 'c2pc' */
00415     LE_DIST_FEATURE_TAG = 0x64697374UL, /**< 'dist' */
00416     LE_DLIG_FEATURE_TAG = 0x646C6967UL, /**< 'dlig' */
00417     LE_DNOM_FEATURE_TAG = 0x646E6F6DUL, /**< 'dnom' */
00418     LE_EXPT_FEATURE_TAG = 0x65787074UL, /**< 'expt' */
00419     LE_FALT_FEATURE_TAG = 0x66616C74UL, /**< 'falt' */
00420     LE_FIN2_FEATURE_TAG = 0x66696E32UL, /**< 'fin2' */
00421     LE_FIN3_FEATURE_TAG = 0x66696E33UL, /**< 'fin3' */
00422     LE_FINA_FEATURE_TAG = 0x66696E61UL, /**< 'fina' */
00423     LE_FRAC_FEATURE_TAG = 0x66726163UL, /**< 'frac' */
00424     LE_FWID_FEATURE_TAG = 0x66776964UL, /**< 'fwid' */
00425     LE_HALF_FEATURE_TAG = 0x68616C66UL, /**< 'half' */
00426     LE_HALN_FEATURE_TAG = 0x68616C6EUL, /**< 'haln' */
00427     LE_HALT_FEATURE_TAG = 0x68616C74UL, /**< 'halt' */
00428     LE_HIST_FEATURE_TAG = 0x68697374UL, /**< 'hist' */
00429     LE_HKNA_FEATURE_TAG = 0x686B6E61UL, /**< 'hkna' */
00430     LE_HLIG_FEATURE_TAG = 0x686C6967UL, /**< 'hlig' */
00431     LE_HNGL_FEATURE_TAG = 0x686E676CUL, /**< 'hngl' */
00432     LE_HWID_FEATURE_TAG = 0x68776964UL, /**< 'hwid' */
00433     LE_INIT_FEATURE_TAG = 0x696E6974UL, /**< 'init' */
00434     LE_ISOL_FEATURE_TAG = 0x69736F6CUL, /**< 'isol' */
00435     LE_ITAL_FEATURE_TAG = 0x6974616CUL, /**< 'ital' */
00436     LE_JALT_FEATURE_TAG = 0x6A616C74UL, /**< 'jalt' */
00437     LE_JP78_FEATURE_TAG = 0x6A703738UL, /**< 'jp78' */
00438     LE_JP83_FEATURE_TAG = 0x6A703833UL, /**< 'jp83' */
00439     LE_JP90_FEATURE_TAG = 0x6A703930UL, /**< 'jp90' */
00440     LE_KERN_FEATURE_TAG = 0x6B65726EUL, /**< 'kern' */
00441     LE_LFBD_FEATURE_TAG = 0x6C666264UL, /**< 'lfbd' */
00442     LE_LIGA_FEATURE_TAG = 0x6C696761UL, /**< 'liga' */
00443     LE_LJMO_FEATURE_TAG = 0x6C6A6D6FUL, /**< 'ljmo' */
00444     LE_LNUM_FEATURE_TAG = 0x6C6E756DUL, /**< 'lnum' */
00445     LE_LOCL_FEATURE_TAG = 0x6C6F636CUL, /**< 'locl' */
00446     LE_MARK_FEATURE_TAG = 0x6D61726BUL, /**< 'mark' */
00447     LE_MED2_FEATURE_TAG = 0x6D656432UL, /**< 'med2' */
00448     LE_MEDI_FEATURE_TAG = 0x6D656469UL, /**< 'medi' */
00449     LE_MGRK_FEATURE_TAG = 0x6D67726BUL, /**< 'mgrk' */
00450     LE_MKMK_FEATURE_TAG = 0x6D6B6D6BUL, /**< 'mkmk' */
00451     LE_MSET_FEATURE_TAG = 0x6D736574UL, /**< 'mset' */
00452     LE_NALT_FEATURE_TAG = 0x6E616C74UL, /**< 'nalt' */
00453     LE_NLCK_FEATURE_TAG = 0x6E6C636BUL, /**< 'nlck' */
00454     LE_NUKT_FEATURE_TAG = 0x6E756B74UL, /**< 'nukt' */
00455     LE_NUMR_FEATURE_TAG = 0x6E756D72UL, /**< 'numr' */
00456     LE_ONUM_FEATURE_TAG = 0x6F6E756DUL, /**< 'onum' */
00457     LE_OPBD_FEATURE_TAG = 0x6F706264UL, /**< 'opbd' */
00458     LE_ORDN_FEATURE_TAG = 0x6F72646EUL, /**< 'ordn' */
00459     LE_ORNM_FEATURE_TAG = 0x6F726E6DUL, /**< 'ornm' */
00460     LE_PALT_FEATURE_TAG = 0x70616C74UL, /**< 'palt' */
00461     LE_PCAP_FEATURE_TAG = 0x70636170UL, /**< 'pcap' */
00462     LE_PNUM_FEATURE_TAG = 0x706E756DUL, /**< 'pnum' */
00463     LE_PREF_FEATURE_TAG = 0x70726566UL, /**< 'pref' */
00464     LE_PRES_FEATURE_TAG = 0x70726573UL, /**< 'pres' */
00465     LE_PSTF_FEATURE_TAG = 0x70737466UL, /**< 'pstf' */
00466     LE_PSTS_FEATURE_TAG = 0x70737473UL, /**< 'psts' */
00467     LE_PWID_FEATURE_TAG = 0x70776964UL, /**< 'pwid' */
00468     LE_QWID_FEATURE_TAG = 0x71776964UL, /**< 'qwid' */
00469     LE_RAND_FEATURE_TAG = 0x72616E64UL, /**< 'rand' */
00470     LE_RLIG_FEATURE_TAG = 0x726C6967UL, /**< 'rlig' */
00471     LE_RPHF_FEATURE_TAG = 0x72706866UL, /**< 'rphf' */
00472       LE_RKRF_FEATURE_TAG = 0x726B7266UL, /**< 'rkrf' */
00473     LE_RTBD_FEATURE_TAG = 0x72746264UL, /**< 'rtbd' */
00474     LE_RTLA_FEATURE_TAG = 0x72746C61UL, /**< 'rtla' */
00475     LE_RUBY_FEATURE_TAG = 0x72756279UL, /**< 'ruby' */
00476     LE_SALT_FEATURE_TAG = 0x73616C74UL, /**< 'salt' */
00477     LE_SINF_FEATURE_TAG = 0x73696E66UL, /**< 'sinf' */
00478     LE_SIZE_FEATURE_TAG = 0x73697A65UL, /**< 'size' */
00479     LE_SMCP_FEATURE_TAG = 0x736D6370UL, /**< 'smcp' */
00480     LE_SMPL_FEATURE_TAG = 0x736D706CUL, /**< 'smpl' */
00481     LE_SS01_FEATURE_TAG = 0x73733031UL, /**< 'ss01' */
00482     LE_SS02_FEATURE_TAG = 0x73733032UL, /**< 'ss02' */
00483     LE_SS03_FEATURE_TAG = 0x73733033UL, /**< 'ss03' */
00484     LE_SS04_FEATURE_TAG = 0x73733034UL, /**< 'ss04' */
00485     LE_SS05_FEATURE_TAG = 0x73733035UL, /**< 'ss05' */
00486     LE_SS06_FEATURE_TAG = 0x73733036UL, /**< 'ss06' */
00487     LE_SS07_FEATURE_TAG = 0x73733037UL, /**< 'ss07' */
00488     LE_SS08_FEATURE_TAG = 0x73733038UL, /**< 'ss08' */
00489     LE_SS09_FEATURE_TAG = 0x73733039UL, /**< 'ss09' */
00490     LE_SS10_FEATURE_TAG = 0x73733130UL, /**< 'ss10' */
00491     LE_SS11_FEATURE_TAG = 0x73733131UL, /**< 'ss11' */
00492     LE_SS12_FEATURE_TAG = 0x73733132UL, /**< 'ss12' */
00493     LE_SS13_FEATURE_TAG = 0x73733133UL, /**< 'ss13' */
00494     LE_SS14_FEATURE_TAG = 0x73733134UL, /**< 'ss14' */
00495     LE_SS15_FEATURE_TAG = 0x73733135UL, /**< 'ss15' */
00496     LE_SS16_FEATURE_TAG = 0x73733136UL, /**< 'ss16' */
00497     LE_SS17_FEATURE_TAG = 0x73733137UL, /**< 'ss17' */
00498     LE_SS18_FEATURE_TAG = 0x73733138UL, /**< 'ss18' */
00499     LE_SS19_FEATURE_TAG = 0x73733139UL, /**< 'ss19' */
00500     LE_SS20_FEATURE_TAG = 0x73733230UL, /**< 'ss20' */
00501     LE_SUBS_FEATURE_TAG = 0x73756273UL, /**< 'subs' */
00502     LE_SUPS_FEATURE_TAG = 0x73757073UL, /**< 'sups' */
00503     LE_SWSH_FEATURE_TAG = 0x73777368UL, /**< 'swsh' */
00504     LE_TITL_FEATURE_TAG = 0x7469746CUL, /**< 'titl' */
00505     LE_TJMO_FEATURE_TAG = 0x746A6D6FUL, /**< 'tjmo' */
00506     LE_TNAM_FEATURE_TAG = 0x746E616DUL, /**< 'tnam' */
00507     LE_TNUM_FEATURE_TAG = 0x746E756DUL, /**< 'tnum' */
00508     LE_TRAD_FEATURE_TAG = 0x74726164UL, /**< 'trad' */
00509     LE_TWID_FEATURE_TAG = 0x74776964UL, /**< 'twid' */
00510     LE_UNIC_FEATURE_TAG = 0x756E6963UL, /**< 'unic' */
00511     LE_VALT_FEATURE_TAG = 0x76616C74UL, /**< 'valt' */
00512     LE_VATU_FEATURE_TAG = 0x76617475UL, /**< 'vatu' */
00513     LE_VERT_FEATURE_TAG = 0x76657274UL, /**< 'vert' */
00514     LE_VHAL_FEATURE_TAG = 0x7668616CUL, /**< 'vhal' */
00515     LE_VJMO_FEATURE_TAG = 0x766A6D6FUL, /**< 'vjmo' */
00516     LE_VKNA_FEATURE_TAG = 0x766B6E61UL, /**< 'vkna' */
00517     LE_VKRN_FEATURE_TAG = 0x766B726EUL, /**< 'vkrn' */
00518     LE_VPAL_FEATURE_TAG = 0x7670616CUL, /**< 'vpal' */
00519     LE_VRT2_FEATURE_TAG = 0x76727432UL, /**< 'vrt2' */
00520     LE_ZERO_FEATURE_TAG = 0x7A65726FUL  /**< 'zero' */
};

/**
 * Error codes returned by the LayoutEngine.
 *
 * @stable ICU 2.4
 */
00528 enum LEErrorCode {
    /* informational */
00530     LE_NO_SUBFONT_WARNING          = U_USING_DEFAULT_WARNING, /**< The font does not contain subfonts. */

    /* success */
00533     LE_NO_ERROR                     = U_ZERO_ERROR, /**< No error, no warning. */

    /* failures */
00536     LE_ILLEGAL_ARGUMENT_ERROR       = U_ILLEGAL_ARGUMENT_ERROR,  /**< An illegal argument was detected. */
00537     LE_MEMORY_ALLOCATION_ERROR      = U_MEMORY_ALLOCATION_ERROR, /**< Memory allocation error. */
00538     LE_INDEX_OUT_OF_BOUNDS_ERROR    = U_INDEX_OUTOFBOUNDS_ERROR, /**< Trying to access an index that is out of bounds. */
00539     LE_NO_LAYOUT_ERROR              = U_UNSUPPORTED_ERROR,       /**< You must call layoutChars() first. */
00540     LE_INTERNAL_ERROR               = U_INTERNAL_PROGRAM_ERROR,  /**< An internal error was encountered. */
00541     LE_FONT_FILE_NOT_FOUND_ERROR    = U_FILE_ACCESS_ERROR,       /**< The requested font file cannot be opened. */
00542     LE_MISSING_FONT_TABLE_ERROR     = U_MISSING_RESOURCE_ERROR   /**< The requested font table does not exist. */
};

#ifndef XP_CPLUSPLUS
/**
 * Error codes returned by the LayoutEngine.
 *
 * @stable ICU 2.4
 */
00551 typedef enum LEErrorCode LEErrorCode;
#endif

/**
 * A convenience macro to test for the success of a LayoutEngine call.
 *
 * @stable ICU 2.4
 */
00559 #define LE_SUCCESS(code) (U_SUCCESS((UErrorCode)code))

/**
 * A convenience macro to test for the failure of a LayoutEngine call.
 *
 * @stable ICU 2.4
 */
00566 #define LE_FAILURE(code) (U_FAILURE((UErrorCode)code))

#endif

Generated by  Doxygen 1.6.0   Back to index