[arabic-table] Add ZWJ/ZWNJ now that table is segmented
This commit is contained in:
parent
2390d9b67e
commit
cd86ab9b4f
@ -52,8 +52,6 @@ def print_joining_table(f):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
u = int (fields[0], 16)
|
u = int (fields[0], 16)
|
||||||
if u == 0x200C or u == 0x200D:
|
|
||||||
continue
|
|
||||||
|
|
||||||
if fields[3] in ["ALAPH", "DALATH RISH"]:
|
if fields[3] in ["ALAPH", "DALATH RISH"]:
|
||||||
value = "JOINING_GROUP_" + fields[3].replace(' ', '_')
|
value = "JOINING_GROUP_" + fields[3].replace(' ', '_')
|
||||||
|
@ -77,7 +77,13 @@ static const uint8_t joining_table[] =
|
|||||||
|
|
||||||
/* 08A0 */ D,X,D,D,D,D,D,D,D,D,R,R,R,
|
/* 08A0 */ D,X,D,D,D,D,D,D,D,D,R,R,R,
|
||||||
|
|
||||||
}; /* Table items: 685; occupancy: 45% */
|
#define joining_offset_0x200c 685
|
||||||
|
|
||||||
|
/* General Punctuation */
|
||||||
|
|
||||||
|
/* 2000 */ U,C,
|
||||||
|
|
||||||
|
}; /* Table items: 687; occupancy: 45% */
|
||||||
|
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
@ -89,6 +95,10 @@ joining_type (hb_codepoint_t u)
|
|||||||
if (0x0600 <= u && u <= 0x08AC) return joining_table[u - 0x0600 + joining_offset_0x0600];
|
if (0x0600 <= u && u <= 0x08AC) return joining_table[u - 0x0600 + joining_offset_0x0600];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 0x2:
|
||||||
|
if (0x200C <= u && u <= 0x200D) return joining_table[u - 0x200C + joining_offset_0x200c];
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -83,11 +83,6 @@ static unsigned int get_joining_type (hb_codepoint_t u, hb_unicode_general_categ
|
|||||||
return JOINING_TYPE_D;
|
return JOINING_TYPE_D;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x200C, 0x200D)))
|
|
||||||
{
|
|
||||||
return u == 0x200C ? JOINING_TYPE_U : JOINING_TYPE_C;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (FLAG(gen_cat) & (FLAG(HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) | FLAG(HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | FLAG(HB_UNICODE_GENERAL_CATEGORY_FORMAT))) ?
|
return (FLAG(gen_cat) & (FLAG(HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) | FLAG(HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | FLAG(HB_UNICODE_GENERAL_CATEGORY_FORMAT))) ?
|
||||||
JOINING_TYPE_T : JOINING_TYPE_U;
|
JOINING_TYPE_T : JOINING_TYPE_U;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user