diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh index ea2e64d2c..ac0d9a79e 100644 --- a/src/hb-ot-layout-private.hh +++ b/src/hb-ot-layout-private.hh @@ -143,17 +143,41 @@ hb_ot_layout_would_substitute_lookup_fast (hb_face_t *face, unsigned int glyphs_length, unsigned int lookup_index); -HB_INTERNAL hb_bool_t -hb_ot_layout_substitute_lookup_fast (hb_face_t *face, - hb_buffer_t *buffer, - unsigned int lookup_index, - hb_mask_t mask); + +/* Should be called before all the substitute_lookup's are done. */ +HB_INTERNAL void +hb_ot_layout_substitute_start (hb_face_t *face, + hb_buffer_t *buffer); HB_INTERNAL hb_bool_t -hb_ot_layout_position_lookup_fast (hb_font_t *font, - hb_buffer_t *buffer, - unsigned int lookup_index, - hb_mask_t mask); +hb_ot_layout_substitute_lookup (hb_face_t *face, + hb_buffer_t *buffer, + unsigned int lookup_index, + hb_mask_t mask); + +/* Should be called after all the substitute_lookup's are done */ +HB_INTERNAL void +hb_ot_layout_substitute_finish (hb_face_t *face, + hb_buffer_t *buffer); + + +/* Should be called before all the position_lookup's are done. Resets positions to zero. */ +HB_INTERNAL void +hb_ot_layout_position_start (hb_font_t *font, + hb_buffer_t *buffer); + +HB_INTERNAL hb_bool_t +hb_ot_layout_position_lookup (hb_font_t *font, + hb_buffer_t *buffer, + unsigned int lookup_index, + hb_mask_t mask); + +/* Should be called after all the position_lookup's are done */ +HB_INTERNAL void +hb_ot_layout_position_finish (hb_font_t *font, + hb_buffer_t *buffer, + hb_bool_t zero_width_attached_marks); + /* diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index 63f30956a..31b3abb92 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -432,16 +432,6 @@ hb_ot_layout_substitute_lookup (hb_face_t *face, hb_buffer_t *buffer, unsigned int lookup_index, hb_mask_t mask) -{ - if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return false; - return hb_ot_layout_substitute_lookup_fast (face, buffer, lookup_index, mask); -} - -hb_bool_t -hb_ot_layout_substitute_lookup_fast (hb_face_t *face, - hb_buffer_t *buffer, - unsigned int lookup_index, - hb_mask_t mask) { if (unlikely (lookup_index >= hb_ot_layout_from_face (face)->gsub_lookup_count)) return false; hb_apply_context_t c (NULL, face, buffer, mask, &hb_ot_layout_from_face (face)->gsub_digests[lookup_index]); @@ -484,16 +474,6 @@ hb_ot_layout_position_lookup (hb_font_t *font, hb_buffer_t *buffer, unsigned int lookup_index, hb_mask_t mask) -{ - if (unlikely (!hb_ot_shaper_face_data_ensure (font->face))) return false; - return hb_ot_layout_position_lookup_fast (font, buffer, lookup_index, mask); -} - -hb_bool_t -hb_ot_layout_position_lookup_fast (hb_font_t *font, - hb_buffer_t *buffer, - unsigned int lookup_index, - hb_mask_t mask) { if (unlikely (lookup_index >= hb_ot_layout_from_face (font->face)->gpos_lookup_count)) return false; hb_apply_context_t c (font, font->face, buffer, mask, &hb_ot_layout_from_face (font->face)->gpos_digests[lookup_index]); diff --git a/src/hb-ot-layout.h b/src/hb-ot-layout.h index d663ab0b2..e14cde81e 100644 --- a/src/hb-ot-layout.h +++ b/src/hb-ot-layout.h @@ -176,23 +176,6 @@ hb_ot_layout_would_substitute_lookup (hb_face_t *face, unsigned int glyphs_length, unsigned int lookup_index); -/* Should be called before all the substitute_lookup's are done. */ -void -hb_ot_layout_substitute_start (hb_face_t *face, - hb_buffer_t *buffer); - -hb_bool_t -hb_ot_layout_substitute_lookup (hb_face_t *face, - hb_buffer_t *buffer, - unsigned int lookup_index, - hb_mask_t mask); - -/* Should be called after all the substitute_lookup's are done */ -void -hb_ot_layout_substitute_finish (hb_face_t *face, - hb_buffer_t *buffer); - - void hb_ot_layout_substitute_closure_lookup (hb_face_t *face, hb_set_t *glyphs, @@ -205,23 +188,6 @@ hb_ot_layout_substitute_closure_lookup (hb_face_t *face, hb_bool_t hb_ot_layout_has_positioning (hb_face_t *face); -/* Should be called before all the position_lookup's are done. Resets positions to zero. */ -void -hb_ot_layout_position_start (hb_font_t *font, - hb_buffer_t *buffer); - -hb_bool_t -hb_ot_layout_position_lookup (hb_font_t *font, - hb_buffer_t *buffer, - unsigned int lookup_index, - hb_mask_t mask); - -/* Should be called after all the position_lookup's are done */ -void -hb_ot_layout_position_finish (hb_font_t *font, - hb_buffer_t *buffer, - hb_bool_t zero_width_attached_marks); - HB_END_DECLS diff --git a/src/hb-ot-map.cc b/src/hb-ot-map.cc index ae0cb61c9..1bab186f9 100644 --- a/src/hb-ot-map.cc +++ b/src/hb-ot-map.cc @@ -85,7 +85,7 @@ void hb_ot_map_t::substitute (hb_face_t *face, hb_buffer_t *buffer) const for (unsigned int pause_index = 0; pause_index < pauses[table_index].len; pause_index++) { const pause_map_t *pause = &pauses[table_index][pause_index]; for (; i < pause->num_lookups; i++) - hb_ot_layout_substitute_lookup_fast (face, buffer, lookups[table_index][i].index, lookups[table_index][i].mask); + hb_ot_layout_substitute_lookup (face, buffer, lookups[table_index][i].index, lookups[table_index][i].mask); buffer->clear_output (); @@ -94,7 +94,7 @@ void hb_ot_map_t::substitute (hb_face_t *face, hb_buffer_t *buffer) const } for (; i < lookups[table_index].len; i++) - hb_ot_layout_substitute_lookup_fast (face, buffer, lookups[table_index][i].index, lookups[table_index][i].mask); + hb_ot_layout_substitute_lookup (face, buffer, lookups[table_index][i].index, lookups[table_index][i].mask); } void hb_ot_map_t::position (hb_font_t *font, hb_buffer_t *buffer) const @@ -105,14 +105,14 @@ void hb_ot_map_t::position (hb_font_t *font, hb_buffer_t *buffer) const for (unsigned int pause_index = 0; pause_index < pauses[table_index].len; pause_index++) { const pause_map_t *pause = &pauses[table_index][pause_index]; for (; i < pause->num_lookups; i++) - hb_ot_layout_position_lookup_fast (font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask); + hb_ot_layout_position_lookup (font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask); if (pause->callback.func) pause->callback.func (this, font, buffer, pause->callback.user_data); } for (; i < lookups[table_index].len; i++) - hb_ot_layout_position_lookup_fast (font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask); + hb_ot_layout_position_lookup (font, buffer, lookups[table_index][i].index, lookups[table_index][i].mask); } void hb_ot_map_t::substitute_closure (hb_face_t *face,