提交 478fd052 编写于 作者: B Behdad Esfahbod

Minor

上级 8979a7f6
...@@ -111,9 +111,10 @@ _hb_unicode_modified_combining_class (hb_unicode_funcs_t *ufuncs, ...@@ -111,9 +111,10 @@ _hb_unicode_modified_combining_class (hb_unicode_funcs_t *ufuncs,
static inline hb_bool_t static inline hb_bool_t
_hb_unicode_is_variation_selector (hb_codepoint_t unicode) _hb_unicode_is_variation_selector (hb_codepoint_t unicode)
{ {
return unlikely ((unicode >= 0x180B && unicode <= 0x180D) || /* MONGOLIAN FREE VARIATION SELECTOR ONE..THREE */ return unlikely (hb_in_ranges<hb_codepoint_t> (unicode,
(unicode >= 0xFE00 && unicode <= 0xFE0F) || /* VARIATION SELECTOR-1..16 */ 0x180B, 0x180D, /* MONGOLIAN FREE VARIATION SELECTOR ONE..THREE */
(unicode >= 0xE0100 && unicode <= 0xE01EF)); /* VARIATION SELECTOR-17..256 */ 0xFE00, 0xFE0F, /* VARIATION SELECTOR-1..16 */
0xE0100, 0xE01EF)); /* VARIATION SELECTOR-17..256 */
} }
/* Zero-Width invisible characters: /* Zero-Width invisible characters:
...@@ -147,16 +148,16 @@ _hb_unicode_is_variation_selector (hb_codepoint_t unicode) ...@@ -147,16 +148,16 @@ _hb_unicode_is_variation_selector (hb_codepoint_t unicode)
static inline hb_bool_t static inline hb_bool_t
_hb_unicode_is_zero_width (hb_codepoint_t ch) _hb_unicode_is_zero_width (hb_codepoint_t ch)
{ {
return ((ch & ~0x007F) == 0x2000 && ( return ((ch & ~0x007F) == 0x2000 && (hb_in_ranges<hb_codepoint_t> (ch,
(ch >= 0x200B && ch <= 0x200F) || 0x200B, 0x200F,
(ch >= 0x202A && ch <= 0x202E) || 0x202A, 0x202E,
(ch >= 0x2060 && ch <= 0x2063) || 0x2060, 0x2063) ||
(ch == 0x2028) (ch == 0x2028))) ||
)) || unlikely (ch == 0x0009 unlikely (ch == 0x0009 ||
|| ch == 0x00AD ch == 0x00AD ||
|| ch == 0x034F ch == 0x034F ||
|| ch == 0x180E ch == 0x180E ||
|| ch == 0xFEFF); ch == 0xFEFF);
} }
#endif /* HB_UNICODE_PRIVATE_HH */ #endif /* HB_UNICODE_PRIVATE_HH */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册