Clean Fitzpatrick hack
This commit is contained in:
parent
95e5f1ae69
commit
b710ea4fde
|
@ -214,7 +214,7 @@ _hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_buffer_t *buffer)
|
||||||
{
|
{
|
||||||
hb_unicode_funcs_t *unicode = buffer->unicode;
|
hb_unicode_funcs_t *unicode = buffer->unicode;
|
||||||
unsigned int u = info->codepoint;
|
unsigned int u = info->codepoint;
|
||||||
unsigned int gen_cat = (unsigned int) unicode->modified_general_category (u);
|
unsigned int gen_cat = (unsigned int) unicode->general_category (u);
|
||||||
unsigned int props = gen_cat;
|
unsigned int props = gen_cat;
|
||||||
|
|
||||||
if (u >= 0x80)
|
if (u >= 0x80)
|
||||||
|
|
|
@ -290,8 +290,13 @@ hb_set_unicode_props (hb_buffer_t *buffer)
|
||||||
_hb_glyph_info_set_unicode_props (&info[i], buffer);
|
_hb_glyph_info_set_unicode_props (&info[i], buffer);
|
||||||
|
|
||||||
/* Marks are already set as continuation by the above line.
|
/* Marks are already set as continuation by the above line.
|
||||||
* Handle ZWJ-continuation. */
|
* Handle Emoji_Modifier and ZWJ-continuation. */
|
||||||
if (unlikely (_hb_glyph_info_is_zwj (&info[i])))
|
if (unlikely (_hb_glyph_info_get_general_category (&info[i]) == HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL &&
|
||||||
|
hb_in_range<hb_codepoint_t> (info[i].codepoint, 0x1F3FBu, 0x1F3FFu)))
|
||||||
|
{
|
||||||
|
_hb_glyph_info_set_continuation (&info[i]);
|
||||||
|
}
|
||||||
|
else if (unlikely (_hb_glyph_info_is_zwj (&info[i])))
|
||||||
{
|
{
|
||||||
_hb_glyph_info_set_continuation (&info[i]);
|
_hb_glyph_info_set_continuation (&info[i]);
|
||||||
if (i + 1 < count &&
|
if (i + 1 < count &&
|
||||||
|
|
|
@ -101,26 +101,6 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline hb_unicode_general_category_t
|
|
||||||
modified_general_category (hb_codepoint_t u)
|
|
||||||
{
|
|
||||||
hb_unicode_general_category_t cat = general_category (u);
|
|
||||||
|
|
||||||
if (unlikely (cat == HB_UNICODE_GENERAL_CATEGORY_MODIFIER_SYMBOL))
|
|
||||||
{
|
|
||||||
/* Recategorize emoji skin-tone modifiers as Unicode mark, so they
|
|
||||||
* behave correctly in non-native directionality. They originally
|
|
||||||
* are MODIFIER_SYMBOL. Fixes:
|
|
||||||
* https://github.com/harfbuzz/harfbuzz/issues/169
|
|
||||||
*/
|
|
||||||
if (unlikely (hb_in_range<hb_codepoint_t> (u, 0x1F3FBu, 0x1F3FFu)))
|
|
||||||
cat = HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK;
|
|
||||||
}
|
|
||||||
|
|
||||||
return cat;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline unsigned int
|
inline unsigned int
|
||||||
modified_combining_class (hb_codepoint_t u)
|
modified_combining_class (hb_codepoint_t u)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue