mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-20 06:21:16 +01:00
Clean Fitzpatrick hack
This commit is contained in:
1 parent
95e5f1ae69
commit
b710ea4fde
3 files changed
+8
-23
No files matched your search
+1
-1
@@ -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;
|
||||
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;
|
||||
|
||||
if (u >= 0x80)
|
||||
|
||||
+7
-2
@@ -290,8 +290,13 @@ hb_set_unicode_props (hb_buffer_t *buffer)
|
||||
_hb_glyph_info_set_unicode_props (&info[i], buffer);
|
||||
|
||||
/* Marks are already set as continuation by the above line.
|
||||
* Handle ZWJ-continuation. */
|
||||
if (unlikely (_hb_glyph_info_is_zwj (&info[i])))
|
||||
* Handle Emoji_Modifier and ZWJ-continuation. */
|
||||
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]);
|
||||
if (i + 1 < count &&
|
||||
|
||||
@@ -101,26 +101,6 @@ HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS_SIMPLE
|
||||
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
|
||||
modified_combining_class (hb_codepoint_t u)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user