10 #if !defined(LE_USE_CMEMORY) && (defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_STATIC_IMPLEMENTATION) || defined(U_COMBINED_IMPLEMENTATION))
11 #define LE_USE_CMEMORY
120 #define LE_GLYPH_MASK 0x0000FFFF
129 #define LE_GLYPH_SHIFT 0
138 #define LE_SUB_FONT_MASK 0x00FF0000
147 #define LE_SUB_FONT_SHIFT 16
156 #define LE_CLIENT_MASK 0xFF000000
165 #define LE_CLIENT_SHIFT 24
174 #define LE_GET_GLYPH(gid) ((gid & LE_GLYPH_MASK) >> LE_GLYPH_SHIFT)
182 #define LE_GET_SUB_FONT(gid) ((gid & LE_SUB_FONT_MASK) >> LE_SUB_FONT_SHIFT)
190 #define LE_GET_CLIENT(gid) ((gid & LE_CLIENT_MASK) >> LE_CLIENT_SHIFT)
199 #define LE_SET_GLYPH(gid, glyph) ((gid & ~LE_GLYPH_MASK) | ((glyph << LE_GLYPH_SHIFT) & LE_GLYPH_MASK))
207 #define LE_SET_SUB_FONT(gid, font) ((gid & ~LE_SUB_FONT_MASK) | ((font << LE_SUB_FONT_SHIFT) & LE_SUB_FONT_MASK))
215 #define LE_SET_CLIENT(gid, client) ((gid & ~LE_CLIENT_MASK) | ((client << LE_CLIENT_SHIFT) & LE_CLIENT_MASK))
232 #ifndef U_HIDE_DEPRECATED_API
273 #ifndef U_HIDE_INTERNAL_API
279 #ifndef LE_ASSERT_BAD_FONT
280 #define LE_ASSERT_BAD_FONT 0
287 #if LE_ASSERT_BAD_FONT
289 #define LE_DEBUG_BAD_FONT(x) fprintf(stderr,"%s:%d: BAD FONT: %s\n", __FILE__, __LINE__, (x));
291 #define LE_DEBUG_BAD_FONT(x)
300 #define LE_UINT32_MAX 0xFFFFFFFFU
302 #define LE_UINT32_MAX UINT32_MAX
306 #define LE_UINTPTR_MAX LE_UINT32_MAX
308 #define LE_UINTPTR_MAX UINTPTR_MAX
314 #define LE_RANGE_CHECK(type, count, ptrfn) (( (LE_UINTPTR_MAX / sizeof(type)) < (size_t)count ) ? NULL : (ptrfn))
320 #define LE_ARRAY_SIZE(array) (sizeof array / sizeof array[0])
322 #ifdef LE_USE_CMEMORY
328 #define LE_ARRAY_COPY(dst, src, count) uprv_memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
336 #define LE_NEW_ARRAY(type, count) (type *) LE_RANGE_CHECK(type,count,uprv_malloc((count) * sizeof(type)))
344 #define LE_GROW_ARRAY(array, newSize) uprv_realloc((void *) (array), (newSize) * sizeof (array)[0])
352 #define LE_DELETE_ARRAY(array) uprv_free((void *) (array))
365 #define LE_ARRAY_SIZE(array) (sizeof array / sizeof array[0])
372 #define LE_ARRAY_COPY(dst, src, count) memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
380 #define LE_NEW_ARRAY(type, count) LE_RANGE_CHECK(type,count,(type *) malloc((count) * sizeof(type)))
388 #define LE_GROW_ARRAY(array, newSize) realloc((void *) (array), (newSize) * sizeof (array)[0])
396 #define LE_DELETE_ARRAY(array) free((void *) (array))
411 #define LE_MAKE_TAG(a, b, c, d) \
412 (((le_uint32)(a) << 24) | \
413 ((le_uint32)(b) << 16) | \
414 ((le_uint32)(c) << 8) | \
651 #define LE_Kerning_FEATURE_FLAG (1 << LE_Kerning_FEATURE_ENUM)
652 #define LE_Ligatures_FEATURE_FLAG (1 << LE_Ligatures_FEATURE_ENUM)
653 #define LE_CLIG_FEATURE_FLAG (1 << LE_CLIG_FEATURE_ENUM)
654 #define LE_DLIG_FEATURE_FLAG (1 << LE_DLIG_FEATURE_ENUM)
655 #define LE_HLIG_FEATURE_FLAG (1 << LE_HLIG_FEATURE_ENUM)
656 #define LE_LIGA_FEATURE_FLAG (1 << LE_LIGA_FEATURE_ENUM)
657 #define LE_RLIG_FEATURE_FLAG (1 << LE_RLIG_FEATURE_ENUM)
658 #define LE_SMCP_FEATURE_FLAG (1 << LE_SMCP_FEATURE_ENUM)
659 #define LE_FRAC_FEATURE_FLAG (1 << LE_FRAC_FEATURE_ENUM)
660 #define LE_AFRC_FEATURE_FLAG (1 << LE_AFRC_FEATURE_ENUM)
661 #define LE_ZERO_FEATURE_FLAG (1 << LE_ZERO_FEATURE_ENUM)
662 #define LE_SWSH_FEATURE_FLAG (1 << LE_SWSH_FEATURE_ENUM)
663 #define LE_CSWH_FEATURE_FLAG (1 << LE_CSWH_FEATURE_ENUM)
664 #define LE_SALT_FEATURE_FLAG (1 << LE_SALT_FEATURE_ENUM)
665 #define LE_NALT_FEATURE_FLAG (1 << LE_NALT_FEATURE_ENUM)
666 #define LE_RUBY_FEATURE_FLAG (1 << LE_RUBY_FEATURE_ENUM)
667 #define LE_SS01_FEATURE_FLAG (1 << LE_SS01_FEATURE_ENUM)
668 #define LE_SS02_FEATURE_FLAG (1 << LE_SS02_FEATURE_ENUM)
669 #define LE_SS03_FEATURE_FLAG (1 << LE_SS03_FEATURE_ENUM)
670 #define LE_SS04_FEATURE_FLAG (1 << LE_SS04_FEATURE_ENUM)
671 #define LE_SS05_FEATURE_FLAG (1 << LE_SS05_FEATURE_ENUM)
672 #define LE_SS06_FEATURE_FLAG (1 << LE_SS06_FEATURE_ENUM)
673 #define LE_SS07_FEATURE_FLAG (1 << LE_SS07_FEATURE_ENUM)
675 #define LE_CHAR_FILTER_FEATURE_FLAG (1 << LE_CHAR_FILTER_FEATURE_ENUM)
680 #define LE_DEFAULT_FEATURE_FLAG (LE_Kerning_FEATURE_FLAG | LE_Ligatures_FEATURE_FLAG)
718 #define LE_SUCCESS(code) (U_SUCCESS((UErrorCode)code))
725 #define LE_FAILURE(code) (U_FAILURE((UErrorCode)code))
UChar32 LEUnicode32
Used to represent 32-bit Unicode code points.
LEErrorCode
Error codes returned by the LayoutEngine.
@ LE_NO_ERROR
No error, no warning.
@ LE_ILLEGAL_ARGUMENT_ERROR
An illegal argument was detected.
@ LE_MISSING_FONT_TABLE_ERROR
The requested font table does not exist.
@ LE_NO_LAYOUT_ERROR
You must call layoutChars() first.
@ LE_INDEX_OUT_OF_BOUNDS_ERROR
Trying to access an index that is out of bounds.
@ LE_INTERNAL_ERROR
An internal error was encountered.
@ LE_FONT_FILE_NOT_FOUND_ERROR
The requested font file cannot be opened.
@ LE_MEMORY_ALLOCATION_ERROR
Memory allocation error.
@ LE_NO_SUBFONT_WARNING
The font does not contain subfonts.
int32_t le_int32
A type used for signed, 32-bit integers.
int16_t le_int16
A type used for signed, 16-bit integers.
UBool le_bool
A type used for boolean values.
uint16_t le_uint16
A type used for unsigned, 16-bit integers.
UChar LEUnicode16
Used to represent 16-bit Unicode code points.
uint32_t le_uint32
A type used for unsigned, 32-bit integers.
UChar LEUnicode
Used to represent 16-bit Unicode code points.
le_uint32 LETag
Used for four character tags.
uint8_t le_uint8
A type used for unsigned, 8-bit integers.
le_uint16 TTGlyphID
Used for 16-bit glyph indices as they're represented in TrueType font tables.
int8_t le_int8
A type used for signed, 8-bit integers.
@ LE_FRAC_FEATURE_ENUM
Feature specific enum.
@ LE_NALT_FEATURE_ENUM
Feature specific enum.
@ LE_Kerning_FEATURE_ENUM
Requests Kerning.
@ LE_SS01_FEATURE_ENUM
Feature specific enum.
@ LE_CHAR_FILTER_FEATURE_ENUM
Apply CharSubstitutionFilter.
@ LE_HLIG_FEATURE_ENUM
Feature specific enum.
@ LE_SS05_FEATURE_ENUM
Feature specific enum.
@ LE_RLIG_FEATURE_ENUM
Feature specific enum.
@ LE_Ligatures_FEATURE_ENUM
Requests Ligatures.
@ LE_SS02_FEATURE_ENUM
Feature specific enum.
@ LE_SWSH_FEATURE_ENUM
Feature specific enum.
@ LE_SS03_FEATURE_ENUM
Feature specific enum.
@ LE_RUBY_FEATURE_ENUM
Feature specific enum.
@ LE_AFRC_FEATURE_ENUM
Feature specific enum.
@ LE_SS07_FEATURE_ENUM
Feature specific enum.
@ LE_CLIG_FEATURE_ENUM
Feature specific enum.
@ LE_SS06_FEATURE_ENUM
Feature specific enum.
@ LE_SS04_FEATURE_ENUM
Feature specific enum.
@ LE_SALT_FEATURE_ENUM
Feature specific enum.
@ LE_CSWH_FEATURE_ENUM
Feature specific enum.
@ LE_SMCP_FEATURE_ENUM
Feature specific enum.
@ LE_LIGA_FEATURE_ENUM
Feature specific enum.
@ LE_ZERO_FEATURE_ENUM
Feature specific enum.
@ LE_DLIG_FEATURE_ENUM
Feature specific enum.
le_uint32 LEGlyphID
Used for glyph indices.
LEFeatureTags
This enumeration defines constants for all the common OpenType feature tags.
@ LE_BLWM_FEATURE_TAG
'blwm'
@ LE_TNAM_FEATURE_TAG
'tnam'
@ LE_C2PC_FEATURE_TAG
'c2pc'
@ LE_SS11_FEATURE_TAG
'ss11'
@ LE_RAND_FEATURE_TAG
'rand'
@ LE_SS01_FEATURE_TAG
'ss01'
@ LE_AALT_FEATURE_TAG
'aalt'
@ LE_AFRC_FEATURE_TAG
'afrc'
@ LE_BLWS_FEATURE_TAG
'blws'
@ LE_NUKT_FEATURE_TAG
'nukt'
@ LE_SS15_FEATURE_TAG
'ss15'
@ LE_PRES_FEATURE_TAG
'pres'
@ LE_HALN_FEATURE_TAG
'haln'
@ LE_ORNM_FEATURE_TAG
'ornm'
@ LE_CURS_FEATURE_TAG
'curs'
@ LE_JP78_FEATURE_TAG
'jp78'
@ LE_VKNA_FEATURE_TAG
'vkna'
@ LE_RTBD_FEATURE_TAG
'rtbd'
@ LE_RTLA_FEATURE_TAG
'rtla'
@ LE_SUBS_FEATURE_TAG
'subs'
@ LE_SS03_FEATURE_TAG
'ss03'
@ LE_NLCK_FEATURE_TAG
'nlck'
@ LE_ISOL_FEATURE_TAG
'isol'
@ LE_PCAP_FEATURE_TAG
'pcap'
@ LE_JALT_FEATURE_TAG
'jalt'
@ LE_JP83_FEATURE_TAG
'jp83'
@ LE_RPHF_FEATURE_TAG
'rphf'
@ LE_SS10_FEATURE_TAG
'ss10'
@ LE_VATU_FEATURE_TAG
'vatu'
@ LE_SS20_FEATURE_TAG
'ss20'
@ LE_CJCT_FEATURE_TAG
'cjct'
@ LE_LNUM_FEATURE_TAG
'lnum'
@ LE_AKHN_FEATURE_TAG
'akhn'
@ LE_ITAL_FEATURE_TAG
'ital'
@ LE_LOCL_FEATURE_TAG
'locl'
@ LE_CSWH_FEATURE_TAG
'cswh'
@ LE_ZERO_FEATURE_TAG
'zero'
@ LE_ORDN_FEATURE_TAG
'ordn'
@ LE_FWID_FEATURE_TAG
'fwid'
@ LE_VERT_FEATURE_TAG
'vert'
@ LE_PSTS_FEATURE_TAG
'psts'
@ LE_SS09_FEATURE_TAG
'ss09'
@ LE_NUMR_FEATURE_TAG
'numr'
@ LE_SS04_FEATURE_TAG
'ss04'
@ LE_SS12_FEATURE_TAG
'ss12'
@ LE_SUPS_FEATURE_TAG
'sups'
@ LE_SS16_FEATURE_TAG
'ss16'
@ LE_HNGL_FEATURE_TAG
'hngl'
@ LE_RLIG_FEATURE_TAG
'rlig'
@ LE_SS13_FEATURE_TAG
'ss13'
@ LE_VRT2_FEATURE_TAG
'vrt2'
@ LE_DIST_FEATURE_TAG
'dist'
@ LE_MEDI_FEATURE_TAG
'medi'
@ LE_BLWF_FEATURE_TAG
'blwf'
@ LE_MED2_FEATURE_TAG
'med2'
@ LE_SMPL_FEATURE_TAG
'smpl'
@ LE_FALT_FEATURE_TAG
'falt'
@ LE_ABVS_FEATURE_TAG
'abvs'
@ LE_MARK_FEATURE_TAG
'mark'
@ LE_KERN_FEATURE_TAG
'kern'
@ LE_SALT_FEATURE_TAG
'salt'
@ LE_HLIG_FEATURE_TAG
'hlig'
@ LE_ABVM_FEATURE_TAG
'abvm'
@ LE_QWID_FEATURE_TAG
'qwid'
@ LE_ABVF_FEATURE_TAG
'abvf'
@ LE_HALF_FEATURE_TAG
'half'
@ LE_PALT_FEATURE_TAG
'palt'
@ LE_FIN3_FEATURE_TAG
'fin3'
@ LE_FINA_FEATURE_TAG
'fina'
@ LE_TJMO_FEATURE_TAG
'tjmo'
@ LE_CPSP_FEATURE_TAG
'cpsp'
@ LE_SS17_FEATURE_TAG
'ss17'
@ LE_RUBY_FEATURE_TAG
'ruby'
@ LE_SS05_FEATURE_TAG
'ss05'
@ LE_TITL_FEATURE_TAG
'titl'
@ LE_HALT_FEATURE_TAG
'halt'
@ LE_PNUM_FEATURE_TAG
'pnum'
@ LE_SMCP_FEATURE_TAG
'smcp'
@ LE_NALT_FEATURE_TAG
'nalt'
@ LE_DLIG_FEATURE_TAG
'dlig'
@ LE_TNUM_FEATURE_TAG
'tnum'
@ LE_VJMO_FEATURE_TAG
'vjmo'
@ LE_TRAD_FEATURE_TAG
'trad'
@ LE_OPBD_FEATURE_TAG
'opbd'
@ LE_LJMO_FEATURE_TAG
'ljmo'
@ LE_SS07_FEATURE_TAG
'ss07'
@ LE_HIST_FEATURE_TAG
'hist'
@ LE_HWID_FEATURE_TAG
'hwid'
@ LE_ONUM_FEATURE_TAG
'onum'
@ LE_FRAC_FEATURE_TAG
'frac'
@ LE_SS19_FEATURE_TAG
'ss19'
@ LE_SS06_FEATURE_TAG
'ss06'
@ LE_LIGA_FEATURE_TAG
'liga'
@ LE_CALT_FEATURE_TAG
'calt'
@ LE_SS18_FEATURE_TAG
'ss18'
@ LE_MKMK_FEATURE_TAG
'mkmk'
@ LE_TWID_FEATURE_TAG
'twid'
@ LE_VKRN_FEATURE_TAG
'vkrn'
@ LE_EXPT_FEATURE_TAG
'expt'
@ LE_CLIG_FEATURE_TAG
'clig'
@ LE_CCMP_FEATURE_TAG
'ccmp'
@ LE_MSET_FEATURE_TAG
'mset'
@ LE_SINF_FEATURE_TAG
'sinf'
@ LE_C2SC_FEATURE_TAG
'c2sc'
@ LE_PSTF_FEATURE_TAG
'pstf'
@ LE_UNIC_FEATURE_TAG
'unic'
@ LE_JP90_FEATURE_TAG
'jp90'
@ LE_SS02_FEATURE_TAG
'ss02'
@ LE_SWSH_FEATURE_TAG
'swsh'
@ LE_SS14_FEATURE_TAG
'ss14'
@ LE_VHAL_FEATURE_TAG
'vhal'
@ LE_PWID_FEATURE_TAG
'pwid'
@ LE_SIZE_FEATURE_TAG
'size'
@ LE_RKRF_FEATURE_TAG
'rkrf'
@ LE_DNOM_FEATURE_TAG
'dnom'
@ LE_VPAL_FEATURE_TAG
'vpal'
@ LE_CASE_FEATURE_TAG
'case'
@ LE_PREF_FEATURE_TAG
'pref'
@ LE_INIT_FEATURE_TAG
'init'
@ LE_HKNA_FEATURE_TAG
'hkna'
@ LE_SS08_FEATURE_TAG
'ss08'
@ LE_FIN2_FEATURE_TAG
'fin2'
@ LE_MGRK_FEATURE_TAG
'mgrk'
@ LE_LFBD_FEATURE_TAG
'lfbd'
@ LE_VALT_FEATURE_TAG
'valt'
LETableTags
This enumeration defines constants for the standard TrueType, OpenType and AAT table tags.
@ LE_MAXP_TABLE_TAG
'maxp'
@ LE_HSTY_TABLE_TAG
'hsty'
@ LE_EBLC_TABLE_TAG
'EBLC'
@ LE_BASE_TABLE_TAG
'BASE'
@ LE_ACNT_TABLE_TAG
'acnt'
@ LE_PREP_TABLE_TAG
'prep'
@ LE_HEAD_TABLE_TAG
'head'
@ LE_VMTX_TABLE_TAG
'vmtx'
@ LE_DSIG_TABLE_TAG
'DSIG'
@ LE_BSLN_TABLE_TAG
'bsln'
@ LE_VORG_TABLE_TAG
'VORG'
@ LE_CMAP_TABLE_TAG
'cmap'
@ LE_MORX_TABLE_TAG
'morx'
@ LE_OPBD_TABLE_TAG
'opbd'
@ LE_FMTX_TABLE_TAG
'fmtx'
@ LE_EBSC_TABLE_TAG
'EBSC'
@ LE_GLYF_TABLE_TAG
'glyf'
@ LE_MORT_TABLE_TAG
'mort'
@ LE_BHED_TABLE_TAG
'bhed'
@ LE_HDMX_TABLE_TAG
'hdmx'
@ LE_PROP_TABLE_TAG
'prop'
@ LE_EBDT_TABLE_TAG
'EBDT'
@ LE_NAME_TABLE_TAG
'name'
@ LE_VDMX_TABLE_TAG
'VDMX'
@ LE_POST_TABLE_TAG
'post'
@ LE_CVAR_TABLE_TAG
'cvar'
@ LE_OS_2_TABLE_TAG
'OS/2'
@ LE_CVT__TABLE_TAG
'cvt '
@ LE_FPGM_TABLE_TAG
'fpgm'
@ LE_JUST_TABLE_TAG
'just'
@ LE_GASP_TABLE_TAG
'gasp'
@ LE_JSTF_TABLE_TAG
'JSTF'
@ LE_PCLT_TABLE_TAG
'PCLT'
@ LE_GSUB_TABLE_TAG
'GSUB'
@ LE_LOCA_TABLE_TAG
'loca'
@ LE_LCAR_TABLE_TAG
'lcar'
@ LE_HMTX_TABLE_TAG
'hmtx'
@ LE_TRAK_TABLE_TAG
'trak'
@ LE_FDSC_TABLE_TAG
'fdsc'
@ LE_ZAPF_TABLE_TAG
'Zapf'
@ LE_VHEA_TABLE_TAG
'vhea'
@ LE_BDAT_TABLE_TAG
'bdat'
@ LE_GDEF_TABLE_TAG
'GDEF'
@ LE_FVAR_TABLE_TAG
'fvar'
@ LE_GVAR_TABLE_TAG
'gvar'
@ LE_BLOC_TABLE_TAG
'bloc'
@ LE_CFF__TABLE_TAG
'CFF '
@ LE_FEAT_TABLE_TAG
'feat'
@ LE_KERN_TABLE_TAG
'kern'
@ LE_GPOS_TABLE_TAG
'GPOS'
@ LE_LTSH_TABLE_TAG
'LTSH'
@ LE_HHEA_TABLE_TAG
'hhea'
@ LE_AVAR_TABLE_TAG
'avar'
Used to hold a pair of (x, y) values which represent a point.
float fY
The y coordinate of the point.
float fX
The x coordinate of the point.
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
int8_t UBool
The ICU boolean type.
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
C++ API: Common ICU base class UObject.
Basic definitions for ICU, for both C and C++ APIs.
@ U_MISSING_RESOURCE_ERROR
The requested resource cannot be found.
@ U_MEMORY_ALLOCATION_ERROR
Memory allocation error.
@ U_ILLEGAL_ARGUMENT_ERROR
Start of codes indicating failure.
@ U_FILE_ACCESS_ERROR
The requested file cannot be found.
@ U_UNSUPPORTED_ERROR
Requested operation not supported in current context.
@ U_INDEX_OUTOFBOUNDS_ERROR
Trying to access the index that is out of bounds.
@ U_ZERO_ERROR
No error, no warning.
@ U_INTERNAL_PROGRAM_ERROR
Indicates a bug in the library code.
@ U_USING_DEFAULT_WARNING
A resource bundle lookup returned a result from the root locale (not an error)