docs/harfbuzz-sections.txt | 7 ++++--- src/hb-aat-layout.cc | 9 ++++++++- src/hb-aat-layout.h | 8 ++++++++ src/hb-aat-layout.hh | 3 --- test/api/fonts/aat-morx.ttf |binary test/api/fonts/aat-trak.ttf |binary test/api/test-aat-layout.c | 13 +++++++++++++ 7 files changed, 33 insertions(+), 7 deletions(-)
New commits: commit 8c05b955eb4aa088b2b5df9b6415863486eaf59c Merge: d19b1680 01f628cf Author: Behdad Esfahbod <[email protected]> Date: Mon Dec 3 14:30:51 2018 -0500 Merge pull request #1439 from ebraminio/tracking [aat] Expose hb_aat_layout_has_tracking API commit 01f628cf5571b8b58108ab66cfc3e929c9840e31 Author: Ebrahim Byagowi <[email protected]> Date: Mon Dec 3 22:04:48 2018 +0330 [aat] Expose hb_aat_layout_has_tracking API diff --git a/docs/harfbuzz-sections.txt b/docs/harfbuzz-sections.txt index 63224317..fd7682ef 100644 --- a/docs/harfbuzz-sections.txt +++ b/docs/harfbuzz-sections.txt @@ -7,13 +7,14 @@ HB_OT_H_IN <FILE>hb-aat-layout</FILE> 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 </SECTION> <SECTION> diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc index 837dcbae..e39df0e1 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 f5745096..760aaae4 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 cbb94546..56a4818b 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 00000000..5827ec5a 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 00000000..07ae3afd 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 358fac87..8cfebb13 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"); _______________________________________________ HarfBuzz mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/harfbuzz
