[OTLayout] Make table type known to apply context
This commit is contained in:
parent
2c7d0b6b80
commit
6880f7e19d
|
@ -255,6 +255,7 @@ struct hb_apply_context_t
|
|||
return ret;
|
||||
}
|
||||
|
||||
unsigned int table_index; /* GSUB/GPOS */
|
||||
hb_font_t *font;
|
||||
hb_face_t *face;
|
||||
hb_buffer_t *buffer;
|
||||
|
@ -268,9 +269,11 @@ struct hb_apply_context_t
|
|||
unsigned int debug_depth;
|
||||
|
||||
|
||||
hb_apply_context_t (hb_font_t *font_,
|
||||
hb_apply_context_t (unsigned int table_index_,
|
||||
hb_font_t *font_,
|
||||
hb_buffer_t *buffer_,
|
||||
hb_mask_t lookup_mask_) :
|
||||
table_index (table_index_),
|
||||
font (font_), face (font->face), buffer (buffer_),
|
||||
direction (buffer_->props.direction),
|
||||
lookup_mask (lookup_mask_),
|
||||
|
|
|
@ -670,7 +670,7 @@ hb_ot_layout_substitute_lookup (hb_font_t *font,
|
|||
{
|
||||
if (unlikely (lookup_index >= hb_ot_layout_from_face (font->face)->gsub_lookup_count)) return false;
|
||||
|
||||
OT::hb_apply_context_t c (font, buffer, mask);
|
||||
OT::hb_apply_context_t c (0, font, buffer, mask);
|
||||
|
||||
const OT::SubstLookup& l = hb_ot_layout_from_face (font->face)->gsub->get_lookup (lookup_index);
|
||||
|
||||
|
@ -719,7 +719,7 @@ hb_ot_layout_position_lookup (hb_font_t *font,
|
|||
{
|
||||
if (unlikely (lookup_index >= hb_ot_layout_from_face (font->face)->gpos_lookup_count)) return false;
|
||||
|
||||
OT::hb_apply_context_t c (font, buffer, mask);
|
||||
OT::hb_apply_context_t c (1, font, buffer, mask);
|
||||
|
||||
const OT::PosLookup& l = hb_ot_layout_from_face (font->face)->gpos->get_lookup (lookup_index);
|
||||
|
||||
|
|
|
@ -244,7 +244,7 @@ arabic_fallback_plan_shape (arabic_fallback_plan_t *fallback_plan,
|
|||
{
|
||||
for (unsigned int i = 0; i < ARABIC_NUM_FALLBACK_FEATURES; i++)
|
||||
if (fallback_plan->lookup_array[i]) {
|
||||
OT::hb_apply_context_t c (font, buffer, fallback_plan->mask_array[i]);
|
||||
OT::hb_apply_context_t c (0, font, buffer, fallback_plan->mask_array[i]);
|
||||
fallback_plan->lookup_array[i]->apply_string (&c, &fallback_plan->digest_array[i]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue