From 6b1e3502e23c110dd810f854ba021f83baab1548 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 13 Feb 2013 11:02:54 -0500 Subject: [PATCH] Remember ZWNJ To be used in upcoming changes. --- src/hb-ot-shape-private.hh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-shape-private.hh b/src/hb-ot-shape-private.hh index 23e80b7bd..74c5b19b3 100644 --- a/src/hb-ot-shape-private.hh +++ b/src/hb-ot-shape-private.hh @@ -94,14 +94,15 @@ inline void _hb_glyph_info_set_unicode_props (hb_glyph_info_t *info, hb_unicode_funcs_t *unicode) { info->unicode_props0() = ((unsigned int) unicode->general_category (info->codepoint)) | - (unicode->is_default_ignorable (info->codepoint) ? 0x80 : 0); + (unicode->is_default_ignorable (info->codepoint) ? 0x80 : 0) | + (info->codepoint == 0x200C ? 0x40 : 0); info->unicode_props1() = unicode->modified_combining_class (info->codepoint); } inline hb_unicode_general_category_t _hb_glyph_info_get_general_category (const hb_glyph_info_t *info) { - return (hb_unicode_general_category_t) (info->unicode_props0() & 0x7F); + return (hb_unicode_general_category_t) (info->unicode_props0() & 0x3F); } inline void @@ -122,4 +123,10 @@ _hb_glyph_info_is_default_ignorable (const hb_glyph_info_t *info) return !!(info->unicode_props0() & 0x80); } +inline hb_bool_t +_hb_glyph_info_is_zwnj (const hb_glyph_info_t *info) +{ + return !!(info->unicode_props0() & 0x40); +} + #endif /* HB_OT_SHAPE_PRIVATE_HH */