Remove now-unused mark zeroing BY_UNICODE
This commit is contained in:
parent
cc4a78bf22
commit
eaadcbbc53
|
@ -41,8 +41,6 @@
|
|||
|
||||
enum hb_ot_shape_zero_width_marks_type_t {
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
|
||||
// HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE_EARLY,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE_LATE,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY,
|
||||
HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE
|
||||
};
|
||||
|
|
|
@ -615,23 +615,6 @@ zero_mark_width (hb_glyph_position_t *pos)
|
|||
pos->y_advance = 0;
|
||||
}
|
||||
|
||||
static inline void
|
||||
zero_mark_widths_by_unicode (hb_buffer_t *buffer, bool adjust_offsets)
|
||||
{
|
||||
if (!(buffer->scratch_flags & HB_BUFFER_SCRATCH_FLAG_HAS_NON_ASCII))
|
||||
return;
|
||||
|
||||
unsigned int count = buffer->len;
|
||||
hb_glyph_info_t *info = buffer->info;
|
||||
for (unsigned int i = 0; i < count; i++)
|
||||
if (_hb_glyph_info_get_general_category (&info[i]) == HB_UNICODE_GENERAL_CATEGORY_NON_SPACING_MARK)
|
||||
{
|
||||
if (adjust_offsets)
|
||||
adjust_mark_offsets (&buffer->pos[i]);
|
||||
zero_mark_width (&buffer->pos[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
zero_mark_widths_by_gdef (hb_buffer_t *buffer, bool adjust_offsets)
|
||||
{
|
||||
|
@ -707,15 +690,8 @@ hb_ot_position_complex (hb_ot_shape_context_t *c)
|
|||
zero_mark_widths_by_gdef (c->buffer, adjust_offsets_when_zeroing);
|
||||
break;
|
||||
|
||||
/* Not currently used for any shaper:
|
||||
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE_EARLY:
|
||||
zero_mark_widths_by_unicode (c->buffer, adjust_offsets_when_zeroing);
|
||||
break;
|
||||
*/
|
||||
|
||||
default:
|
||||
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE:
|
||||
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE_LATE:
|
||||
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE:
|
||||
break;
|
||||
}
|
||||
|
@ -748,17 +724,12 @@ hb_ot_position_complex (hb_ot_shape_context_t *c)
|
|||
|
||||
switch (c->plan->shaper->zero_width_marks)
|
||||
{
|
||||
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE_LATE:
|
||||
zero_mark_widths_by_unicode (c->buffer, adjust_offsets_when_zeroing);
|
||||
break;
|
||||
|
||||
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_LATE:
|
||||
zero_mark_widths_by_gdef (c->buffer, adjust_offsets_when_zeroing);
|
||||
break;
|
||||
|
||||
default:
|
||||
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE:
|
||||
//case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_UNICODE_EARLY:
|
||||
case HB_OT_SHAPE_ZERO_WIDTH_MARKS_BY_GDEF_EARLY:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue