#include "hb-ot-layout-gsubgpos-private.h"
+#define HB_OT_LAYOUT_GPOS_NO_LAST ((unsigned int) -1)
/* Shared Tables: ValueRecord, Anchor Table, and MarkArray */
return _hb_popcount32 ((unsigned int) *this);
}
- const void apply_value (hb_ot_layout_t *layout,
- const char *base,
- const Value *values,
- HB_Position glyph_pos) const
+ const void apply_value (hb_ot_layout_t *layout,
+ const char *base,
+ const Value *values,
+ hb_glyph_position_t *glyph_pos) const
{
unsigned int x_ppem, y_ppem;
hb_16dot16_t x_scale, y_scale;
return false;
unsigned int j = buffer->in_pos + 1;
- while (!_hb_ot_layout_check_glyph_property (layout, IN_ITEM (j), lookup_flag, &property))
+ while (!_hb_ot_layout_check_glyph_property (layout, IN_INFO (j), lookup_flag, &property))
{
if (HB_UNLIKELY (j == end))
return false;
return false;
unsigned int j = buffer->in_pos + 1;
- while (!_hb_ot_layout_check_glyph_property (layout, IN_ITEM (j), lookup_flag, &property))
+ while (!_hb_ot_layout_check_glyph_property (layout, IN_INFO (j), lookup_flag, &property))
{
if (HB_UNLIKELY (j == end))
return false;
struct hb_ot_layout_t::gpos_info_t *gpi = &layout->gpos_info;
hb_codepoint_t last_pos = gpi->last;
- gpi->last = HB_OT_GPOS_NO_LAST;
+ gpi->last = HB_OT_LAYOUT_GPOS_NO_LAST;
/* We don't handle mark glyphs here. */
if (property == HB_OT_LAYOUT_GLYPH_CLASS_MARK)
hb_position_t entry_x, entry_y, exit_x, exit_y;
- if (last_pos == HB_OT_GPOS_NO_LAST || !record.entryAnchor)
+ if (last_pos == HB_OT_LAYOUT_GPOS_NO_LAST || !record.entryAnchor)
goto end;
(this+record.entryAnchor).get_anchor (layout, IN_CURGLYPH (), &entry_x, &entry_y);
unsigned int index = base_index * classCount + mark_class;
(&base_array+base_array.matrix[index]).get_anchor (layout, IN_GLYPH (j), &base_x, &base_y);
- HB_Position o = POSITION (buffer->in_pos);
+ hb_glyph_position_t *o = POSITION (buffer->in_pos);
o->x_pos = base_x - mark_x;
o->y_pos = base_y - mark_y;
o->x_advance = 0;
unsigned int index = comp_index * classCount + mark_class;
(&lig_attach+lig_attach.matrix[index]).get_anchor (layout, IN_GLYPH (j), &lig_x, &lig_y);
- HB_Position o = POSITION (buffer->in_pos);
+ hb_glyph_position_t *o = POSITION (buffer->in_pos);
o->x_pos = lig_x - mark_x;
o->y_pos = lig_y - mark_y;
o->x_advance = 0;
unsigned int index = mark2_index * classCount + mark1_class;
(&mark2_array+mark2_array.matrix[index]).get_anchor (layout, IN_GLYPH (j), &mark2_x, &mark2_y);
- HB_Position o = POSITION (buffer->in_pos);
+ hb_glyph_position_t *o = POSITION (buffer->in_pos);
o->x_pos = mark2_x - mark1_x;
o->y_pos = mark2_y - mark1_y;
o->x_advance = 0;
unsigned int lookup_flag = get_flag ();
unsigned int property;
- if (!_hb_ot_layout_check_glyph_property (layout, IN_CURITEM (), lookup_flag, &property))
+ if (!_hb_ot_layout_check_glyph_property (layout, IN_CURINFO (), lookup_flag, &property))
return false;
for (unsigned int i = 0; i < get_subtable_count (); i++)
if (HB_UNLIKELY (!buffer->in_length))
return false;
- layout->gpos_info.last = HB_OT_GPOS_NO_LAST; /* no last valid glyph for cursive pos. */
+ layout->gpos_info.last = HB_OT_LAYOUT_GPOS_NO_LAST; /* no last valid glyph for cursive pos. */
buffer->in_pos = 0;
while (buffer->in_pos < buffer->in_length)
done = false;
/* Contrary to properties defined in GDEF, user-defined properties
will always stop a possible cursive positioning. */
- layout->gpos_info.last = HB_OT_GPOS_NO_LAST;
+ layout->gpos_info.last = HB_OT_LAYOUT_GPOS_NO_LAST;
}
if (!done)