From 8249ec3f86510fd24462ce71ed64a6978f0ade17 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 4 Nov 2015 13:26:17 -0800 Subject: [PATCH] Make top-byte of unicode_props available to be used differently per-GC --- src/hb-ot-layout-private.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh index 43a8bc10f..8e56803f4 100644 --- a/src/hb-ot-layout-private.hh +++ b/src/hb-ot-layout-private.hh @@ -278,13 +278,15 @@ static inline void _hb_glyph_info_set_modified_combining_class (hb_glyph_info_t *info, unsigned int modified_class) { + if (unlikely (!_hb_glyph_info_is_unicode_mark (info))) + return; info->unicode_props() = (modified_class<<8) | (info->unicode_props() & 0xFF); } static inline unsigned int _hb_glyph_info_get_modified_combining_class (const hb_glyph_info_t *info) { - return info->unicode_props()>>8; + return _hb_glyph_info_is_unicode_mark (info) ? info->unicode_props()>>8 : 0; } static inline bool _hb_glyph_info_ligated (const hb_glyph_info_t *info);