[aat] Expose hb_aat_layout_has_tracking API
This commit is contained in:
parent
d19b1680b5
commit
01f628cf55
|
@ -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>
|
||||
|
|
|
@ -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 ();
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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,
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue