Switch Pango to new, defunt, GPOS
This commit is contained in:
parent
5e5eb0573f
commit
9c42f05a5c
@ -843,16 +843,24 @@ struct PosLookup : Lookup {
|
||||
if (HB_UNLIKELY (!buffer->in_length))
|
||||
return false;
|
||||
|
||||
_hb_buffer_clear_positions (buffer);
|
||||
layout->gpos_info.last = 0xFFFF; /* no last valid glyph for cursive pos. */
|
||||
|
||||
buffer->in_pos = 0;
|
||||
while (buffer->in_pos < buffer->in_length) {
|
||||
|
||||
if ((~IN_PROPERTIES (buffer->in_pos) & mask) &&
|
||||
position_once (layout, buffer))
|
||||
ret = true;
|
||||
else
|
||||
_hb_buffer_next_glyph (buffer);
|
||||
bool done;
|
||||
if (~IN_PROPERTIES (buffer->in_pos) & mask) {
|
||||
done = position_once (layout, buffer);
|
||||
ret |= done;
|
||||
} else {
|
||||
done = false;
|
||||
/* Contrary to properties defined in GDEF, user-defined properties
|
||||
will always stop a possible cursive positioning. */
|
||||
layout->gpos_info.last = 0xFFFF;
|
||||
}
|
||||
|
||||
if (!done)
|
||||
buffer->in_pos++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -531,6 +531,19 @@ hb_ot_layout_substitute_lookup (hb_ot_layout_t *layout,
|
||||
return layout->gsub->substitute_lookup (layout, buffer, lookup_index, mask);
|
||||
}
|
||||
|
||||
/*
|
||||
* GPOS
|
||||
*/
|
||||
|
||||
hb_bool_t
|
||||
hb_ot_layout_position_lookup (hb_ot_layout_t *layout,
|
||||
hb_buffer_t *buffer,
|
||||
unsigned int lookup_index,
|
||||
hb_ot_layout_feature_mask_t mask)
|
||||
{
|
||||
return layout->gpos->position_lookup (layout, buffer, lookup_index, mask);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* TODO dupped, until he old code can be removed */
|
||||
|
@ -207,6 +207,11 @@ hb_ot_layout_substitute_lookup (hb_ot_layout_t *layout,
|
||||
unsigned int lookup_index,
|
||||
hb_ot_layout_feature_mask_t mask);
|
||||
|
||||
hb_bool_t
|
||||
hb_ot_layout_position_lookup (hb_ot_layout_t *layout,
|
||||
hb_buffer_t *buffer,
|
||||
unsigned int lookup_index,
|
||||
hb_ot_layout_feature_mask_t mask);
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user