[aat] Expose a couple APIs

New API:
+hb_aat_layout_has_substitution()
+hb_aat_layout_has_positioning()
This commit is contained in:
Behdad Esfahbod 2018-12-03 10:41:37 -05:00
parent 84efe0438e
commit d19b1680b5
4 changed files with 34 additions and 10 deletions

View File

@ -12,6 +12,8 @@ hb_aat_layout_feature_type_get_name_id
hb_aat_layout_feature_selector_t
hb_aat_layout_feature_selector_info_t
hb_aat_layout_feature_type_get_selector_infos
hb_aat_layout_has_substitution
hb_aat_layout_has_positioning
</SECTION>
<SECTION>

View File

@ -205,7 +205,14 @@ hb_aat_layout_compile_map (const hb_aat_map_builder_t *mapper,
}
bool
/*
* hb_aat_layout_has_substitution:
* @face:
*
* Returns:
* Since: REPLACEME
*/
hb_bool_t
hb_aat_layout_has_substitution (hb_face_t *face)
{
return face->table.morx->has_data () ||
@ -259,9 +266,14 @@ hb_aat_layout_remove_deleted_glyphs (hb_buffer_t *buffer)
hb_ot_layout_delete_glyphs_inplace (buffer, is_deleted_glyph);
}
bool
/*
* hb_aat_layout_has_positioning:
* @face:
*
* Returns:
* Since: REPLACEME
*/
hb_bool_t
hb_aat_layout_has_positioning (hb_face_t *face)
{
return face->table.kerx->has_data ();

View File

@ -457,6 +457,22 @@ hb_aat_layout_feature_type_get_selector_infos (hb_face_t
unsigned int *default_index /* OUT. May be NULL. */);
/*
* morx/mort
*/
HB_EXTERN hb_bool_t
hb_aat_layout_has_substitution (hb_face_t *face);
/*
* kerx
*/
HB_EXTERN hb_bool_t
hb_aat_layout_has_positioning (hb_face_t *face);
HB_END_DECLS
#endif /* HB_AAT_LAYOUT_H */

View File

@ -56,9 +56,6 @@ HB_INTERNAL void
hb_aat_layout_compile_map (const hb_aat_map_builder_t *mapper,
hb_aat_map_t *map);
HB_INTERNAL bool
hb_aat_layout_has_substitution (hb_face_t *face);
HB_INTERNAL void
hb_aat_layout_substitute (const hb_ot_shape_plan_t *plan,
hb_font_t *font,
@ -70,9 +67,6 @@ hb_aat_layout_zero_width_deleted_glyphs (hb_buffer_t *buffer);
HB_INTERNAL void
hb_aat_layout_remove_deleted_glyphs (hb_buffer_t *buffer);
HB_INTERNAL bool
hb_aat_layout_has_positioning (hb_face_t *face);
HB_INTERNAL void
hb_aat_layout_position (const hb_ot_shape_plan_t *plan,
hb_font_t *font,