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
275 #ifndef LE_ASSERT_BAD_FONT
276 #define LE_ASSERT_BAD_FONT 0
279 #if LE_ASSERT_BAD_FONT
281 #define LE_DEBUG_BAD_FONT(x) fprintf(stderr,"%s:%d: BAD FONT: %s\n", __FILE__, __LINE__, (x));
283 #define LE_DEBUG_BAD_FONT(x)
291 #define LE_UINT32_MAX 0xFFFFFFFFU
293 #define LE_UINT32_MAX UINT32_MAX
297 #define LE_UINTPTR_MAX LE_UINT32_MAX
299 #define LE_UINTPTR_MAX UINTPTR_MAX
305 #define LE_RANGE_CHECK(type, count, ptrfn) (( (LE_UINTPTR_MAX / sizeof(type)) < count ) ? NULL : (ptrfn))
311 #define LE_ARRAY_SIZE(array) (sizeof array / sizeof array[0])
313 #ifdef LE_USE_CMEMORY
319 #define LE_ARRAY_COPY(dst, src, count) uprv_memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
327 #define LE_NEW_ARRAY(type, count) (type *) LE_RANGE_CHECK(type,count,uprv_malloc((count) * sizeof(type)))
335 #define LE_GROW_ARRAY(array, newSize) uprv_realloc((void *) (array), (newSize) * sizeof (array)[0])
343 #define LE_DELETE_ARRAY(array) uprv_free((void *) (array))
356 #define LE_ARRAY_SIZE(array) (sizeof array / sizeof array[0])
363 #define LE_ARRAY_COPY(dst, src, count) memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
371 #define LE_NEW_ARRAY(type, count) LE_RANGE_CHECK(type,count,(type *) malloc((count) * sizeof(type)))
379 #define LE_GROW_ARRAY(array, newSize) realloc((void *) (array), (newSize) * sizeof (array)[0])
387 #define LE_DELETE_ARRAY(array) free((void *) (array))
402 #define LE_MAKE_TAG(a, b, c, d) \
403 (((le_uint32)(a) << 24) | \
404 ((le_uint32)(b) << 16) | \
405 ((le_uint32)(c) << 8) | \
642 #define LE_Kerning_FEATURE_FLAG (1 << LE_Kerning_FEATURE_ENUM)
643 #define LE_Ligatures_FEATURE_FLAG (1 << LE_Ligatures_FEATURE_ENUM)
644 #define LE_CLIG_FEATURE_FLAG (1 << LE_CLIG_FEATURE_ENUM)
645 #define LE_DLIG_FEATURE_FLAG (1 << LE_DLIG_FEATURE_ENUM)
646 #define LE_HLIG_FEATURE_FLAG (1 << LE_HLIG_FEATURE_ENUM)
647 #define LE_LIGA_FEATURE_FLAG (1 << LE_LIGA_FEATURE_ENUM)
648 #define LE_RLIG_FEATURE_FLAG (1 << LE_RLIG_FEATURE_ENUM)
649 #define LE_SMCP_FEATURE_FLAG (1 << LE_SMCP_FEATURE_ENUM)
650 #define LE_FRAC_FEATURE_FLAG (1 << LE_FRAC_FEATURE_ENUM)
651 #define LE_AFRC_FEATURE_FLAG (1 << LE_AFRC_FEATURE_ENUM)
652 #define LE_ZERO_FEATURE_FLAG (1 << LE_ZERO_FEATURE_ENUM)
653 #define LE_SWSH_FEATURE_FLAG (1 << LE_SWSH_FEATURE_ENUM)
654 #define LE_CSWH_FEATURE_FLAG (1 << LE_CSWH_FEATURE_ENUM)
655 #define LE_SALT_FEATURE_FLAG (1 << LE_SALT_FEATURE_ENUM)
656 #define LE_NALT_FEATURE_FLAG (1 << LE_NALT_FEATURE_ENUM)
657 #define LE_RUBY_FEATURE_FLAG (1 << LE_RUBY_FEATURE_ENUM)
658 #define LE_SS01_FEATURE_FLAG (1 << LE_SS01_FEATURE_ENUM)
659 #define LE_SS02_FEATURE_FLAG (1 << LE_SS02_FEATURE_ENUM)
660 #define LE_SS03_FEATURE_FLAG (1 << LE_SS03_FEATURE_ENUM)
661 #define LE_SS04_FEATURE_FLAG (1 << LE_SS04_FEATURE_ENUM)
662 #define LE_SS05_FEATURE_FLAG (1 << LE_SS05_FEATURE_ENUM)
663 #define LE_SS06_FEATURE_FLAG (1 << LE_SS06_FEATURE_ENUM)
664 #define LE_SS07_FEATURE_FLAG (1 << LE_SS07_FEATURE_ENUM)
666 #define LE_CHAR_FILTER_FEATURE_FLAG (1 << LE_CHAR_FILTER_FEATURE_ENUM)
671 #define LE_DEFAULT_FEATURE_FLAG (LE_Kerning_FEATURE_FLAG | LE_Ligatures_FEATURE_FLAG)
709 #define LE_SUCCESS(code) (U_SUCCESS((UErrorCode)code))
716 #define LE_FAILURE(code) (U_FAILURE((UErrorCode)code))
le_uint16 TTGlyphID
Used for 16-bit glyph indices as they're represented in TrueType font tables.
uint32_t le_uint32
A type used for unsigned, 32-bit integers.
UChar32 LEUnicode32
Used to represent 32-bit Unicode code points.
le_uint32 LETag
Used for four character tags.
An illegal argument was detected.
uint16_t le_uint16
A type used for unsigned, 16-bit integers.
The requested resource cannot be found.
LETableTags
This enumeration defines constants for the standard TrueType, OpenType and AAT table tags...
UChar LEUnicode16
Used to represent 16-bit Unicode code points.
Trying to access an index that is out of bounds.
Indicates a bug in the library code.
int8_t le_int8
A type used for signed, 8-bit integers.
Trying to access the index that is out of bounds.
int32_t le_int32
A type used for signed, 32-bit integers.
UBool le_bool
A type used for boolean values.
The requested file cannot be found.
float fX
The x coordinate of the point.
float fY
The y coordinate of the point.
Requested operation not supported in current context.
A resource bundle lookup returned a result from the root locale (not an error)
Start of codes indicating failure.
You must call layoutChars() first.
An internal error was encountered.
int32_t UChar32
Define UChar32 as a type for single Unicode code points.
The requested font file cannot be opened.
LEErrorCode
Error codes returned by the LayoutEngine.
C++ API: Common ICU base class UObject.
uint8_t le_uint8
A type used for unsigned, 8-bit integers.
uint16_t UChar
Define UChar to be UCHAR_TYPE, if that is #defined (for example, to char16_t), or wchar_t if that is ...
Apply CharSubstitutionFilter.
The requested font table does not exist.
UChar LEUnicode
Used to represent 16-bit Unicode code points.
le_uint32 LEGlyphID
Used for glyph indices.
The font does not contain subfonts.
Basic definitions for ICU, for both C and C++ APIs.
LEFeatureTags
This enumeration defines constants for all the common OpenType feature tags.
int8_t UBool
The ICU boolean type.
int16_t le_int16
A type used for signed, 16-bit integers.
Used to hold a pair of (x, y) values which represent a point.