diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index 632243175..fd7682ef3 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -7,13 +7,14 @@ HB_OT_H_IN hb-aat-layout HB_AAT_LAYOUT_NO_SELECTOR_INDEX hb_aat_layout_feature_type_t -hb_aat_layout_get_feature_types -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_name_id hb_aat_layout_feature_type_get_selector_infos -hb_aat_layout_has_substitution +hb_aat_layout_get_feature_types hb_aat_layout_has_positioning +hb_aat_layout_has_substitution +hb_aat_layout_has_tracking
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc index 837dcbae2..e39df0e1b 100644 --- a/src/hb-aat-layout.cc +++ b/src/hb-aat-layout.cc @@ -296,7 +296,14 @@ hb_aat_layout_position (const hb_ot_shape_plan_t *plan, } -bool +/* + * hb_aat_layout_has_tracking: + * @face: + * + * Returns: + * Since: REPLACEME + */ +hb_bool_t hb_aat_layout_has_tracking (hb_face_t *face) { return face->table.trak->has_data (); diff --git a/src/hb-aat-layout.h b/src/hb-aat-layout.h index f5745096e..760aaae40 100644 --- a/src/hb-aat-layout.h +++ b/src/hb-aat-layout.h @@ -473,6 +473,14 @@ HB_EXTERN hb_bool_t hb_aat_layout_has_positioning (hb_face_t *face); +/* + * trak + */ + +HB_EXTERN hb_bool_t +hb_aat_layout_has_tracking (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 cbb94546e..56a4818be 100644 --- a/src/hb-aat-layout.hh +++ b/src/hb-aat-layout.hh @@ -72,9 +72,6 @@ hb_aat_layout_position (const hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer); -HB_INTERNAL bool -hb_aat_layout_has_tracking (hb_face_t *face); - HB_INTERNAL void hb_aat_layout_track (const hb_ot_shape_plan_t *plan, hb_font_t *font, diff --git a/test/api/fonts/aat-morx.ttf b/test/api/fonts/aat-morx.ttf new file mode 100644 index 000000000..5827ec5a6 Binary files /dev/null and b/test/api/fonts/aat-morx.ttf differ diff --git a/test/api/fonts/aat-trak.ttf b/test/api/fonts/aat-trak.ttf new file mode 100644 index 000000000..07ae3afd8 Binary files /dev/null and b/test/api/fonts/aat-trak.ttf differ diff --git a/test/api/test-aat-layout.c b/test/api/test-aat-layout.c index 358fac879..8cfebb138 100644 --- a/test/api/test-aat-layout.c +++ b/test/api/test-aat-layout.c @@ -101,6 +101,18 @@ test_aat_get_feature_selectors (void) g_assert_cmpuint (0, ==, count); } +static void +test_aat_has (void) +{ + hb_face_t *morx = hb_test_open_font_file ("fonts/aat-morx.ttf"); + g_assert (hb_aat_layout_has_substitution (morx)); + hb_face_destroy (morx); + + hb_face_t *trak = hb_test_open_font_file ("fonts/aat-trak.ttf"); + g_assert (hb_aat_layout_has_tracking (trak)); + hb_face_destroy (trak); +} + int main (int argc, char **argv) { @@ -108,6 +120,7 @@ main (int argc, char **argv) hb_test_add (test_aat_get_feature_types); hb_test_add (test_aat_get_feature_selectors); + hb_test_add (test_aat_has); face = hb_test_open_font_file ("fonts/aat-feat.ttf"); sbix = hb_test_open_font_file ("fonts/chromacheck-sbix.ttf");