[unicode] Add HB_UNICODE_MAX

New API:
HB_UNICODE_MAX
This commit is contained in:
Behdad Esfahbod 2018-08-25 22:07:17 -07:00
parent b09a0336ca
commit 82b12bcadd
3 changed files with 6 additions and 6 deletions

View File

@ -605,6 +605,7 @@ hb_shape_plan_t
<SECTION> <SECTION>
<FILE>hb-unicode</FILE> <FILE>hb-unicode</FILE>
HB_UNICODE_MAX
HB_UNICODE_MAX_DECOMPOSITION_LEN HB_UNICODE_MAX_DECOMPOSITION_LEN
hb_unicode_combining_class hb_unicode_combining_class
hb_unicode_combining_class_func_t hb_unicode_combining_class_func_t

View File

@ -37,10 +37,6 @@
*/ */
#define HB_OT_TAG_cmap HB_TAG('c','m','a','p') #define HB_OT_TAG_cmap HB_TAG('c','m','a','p')
#ifndef HB_MAX_UNICODE_CODEPOINT_VALUE
#define HB_MAX_UNICODE_CODEPOINT_VALUE 0x10FFFF
#endif
namespace OT { namespace OT {
@ -478,7 +474,7 @@ struct CmapSubtableLongSegmented
for (unsigned int i = 0; i < this->groups.len; i++) { for (unsigned int i = 0; i < this->groups.len; i++) {
out->add_range (this->groups[i].startCharCode, out->add_range (this->groups[i].startCharCode,
MIN ((hb_codepoint_t) this->groups[i].endCharCode, MIN ((hb_codepoint_t) this->groups[i].endCharCode,
(hb_codepoint_t) HB_MAX_UNICODE_CODEPOINT_VALUE)); (hb_codepoint_t) HB_UNICODE_MAX));
} }
} }
@ -624,7 +620,7 @@ struct DefaultUVS : SortedArrayOf<UnicodeValueRange, HBUINT32>
{ {
hb_codepoint_t first = arrayZ[i].startUnicodeValue; hb_codepoint_t first = arrayZ[i].startUnicodeValue;
hb_codepoint_t last = MIN ((hb_codepoint_t) (first + arrayZ[i].additionalCount), hb_codepoint_t last = MIN ((hb_codepoint_t) (first + arrayZ[i].additionalCount),
(hb_codepoint_t) HB_MAX_UNICODE_CODEPOINT_VALUE); (hb_codepoint_t) HB_UNICODE_MAX);
out->add_range (first, last); out->add_range (first, last);
} }
} }

View File

@ -40,6 +40,9 @@
HB_BEGIN_DECLS HB_BEGIN_DECLS
#define HB_UNICODE_MAX 0x10FFFFu
/* hb_unicode_general_category_t */ /* hb_unicode_general_category_t */
/* Unicode Character Database property: General_Category (gc) */ /* Unicode Character Database property: General_Category (gc) */