From d19b1680b53e54f449736432f369a676c394ebf8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 3 Dec 2018 10:41:37 -0500 Subject: [PATCH] [aat] Expose a couple APIs New API: +hb_aat_layout_has_substitution() +hb_aat_layout_has_positioning() --- docs/harfbuzz-sections.txt | 2 ++ src/hb-aat-layout.cc | 20 ++++++++++++++++---- src/hb-aat-layout.h | 16 ++++++++++++++++ src/hb-aat-layout.hh | 6 ------ 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index 5c45153c3..632243175 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -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
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc index fae67800c..837dcbae2 100644 --- a/src/hb-aat-layout.cc +++ b/src/hb-aat-layout.cc @@ -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 (); diff --git a/src/hb-aat-layout.h b/src/hb-aat-layout.h index 696e90334..f5745096e 100644 --- a/src/hb-aat-layout.h +++ b/src/hb-aat-layout.h @@ -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 */ diff --git a/src/hb-aat-layout.hh b/src/hb-aat-layout.hh index 5fd47ed62..cbb94546e 100644 --- a/src/hb-aat-layout.hh +++ b/src/hb-aat-layout.hh @@ -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,