From 71baea0062da4d7f143d62da38492a0813814e49 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 3 Aug 2012 17:40:07 -0700 Subject: [PATCH] [OT] Use general-category, not GDEF class, to decide to zero mark advances At this point, the GDEF glyph synthesis looks pointless. Not that I have many fonts without GDEF lying around. As for mark advance zeroing when GPOS not available, that also is being replaced by proper fallback mark positioning soon. --- src/hb-ot-shape.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 28bb1f9..08457be 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -347,10 +347,7 @@ hb_synthesize_glyph_classes (hb_ot_shape_context_t *c) { unsigned int count = c->buffer->len; for (unsigned int i = 0; i < count; i++) - c->buffer->info[i].glyph_props() = FLAG (_hb_glyph_info_get_general_category (&c->buffer->info[i])) & - (FLAG (HB_UNICODE_GENERAL_CATEGORY_SPACING_MARK) | - FLAG (HB_UNICODE_GENERAL_CATEGORY_ENCLOSING_MARK) | - FLAG (HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)) ? + c->buffer->info[i].glyph_props() = _hb_glyph_info_get_general_category (&c->buffer->info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK ? HB_OT_LAYOUT_GLYPH_CLASS_MARK : HB_OT_LAYOUT_GLYPH_CLASS_BASE_GLYPH; } @@ -398,7 +395,7 @@ hb_zero_mark_advances (hb_ot_shape_context_t *c) { unsigned int count = c->buffer->len; for (unsigned int i = 0; i < count; i++) - if (c->buffer->info[i].glyph_props() & HB_OT_LAYOUT_GLYPH_CLASS_MARK) + if (_hb_glyph_info_get_general_category (&c->buffer->info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK) { c->buffer->pos[i].x_advance = 0; c->buffer->pos[i].y_advance = 0; -- 2.7.4