[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.
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 @@
{
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 @@
{
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;