Merge pull request #1439 from ebraminio/tracking
[aat] Expose hb_aat_layout_has_tracking API
This commit is contained in:
commit
8c05b955eb
|
@ -7,13 +7,14 @@ HB_OT_H_IN
|
||||||
<FILE>hb-aat-layout</FILE>
|
<FILE>hb-aat-layout</FILE>
|
||||||
HB_AAT_LAYOUT_NO_SELECTOR_INDEX
|
HB_AAT_LAYOUT_NO_SELECTOR_INDEX
|
||||||
hb_aat_layout_feature_type_t
|
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_t
|
||||||
hb_aat_layout_feature_selector_info_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_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_positioning
|
||||||
|
hb_aat_layout_has_substitution
|
||||||
|
hb_aat_layout_has_tracking
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
<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)
|
hb_aat_layout_has_tracking (hb_face_t *face)
|
||||||
{
|
{
|
||||||
return face->table.trak->has_data ();
|
return face->table.trak->has_data ();
|
||||||
|
|
|
@ -473,6 +473,14 @@ HB_EXTERN hb_bool_t
|
||||||
hb_aat_layout_has_positioning (hb_face_t *face);
|
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
|
HB_END_DECLS
|
||||||
|
|
||||||
#endif /* HB_AAT_LAYOUT_H */
|
#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_font_t *font,
|
||||||
hb_buffer_t *buffer);
|
hb_buffer_t *buffer);
|
||||||
|
|
||||||
HB_INTERNAL bool
|
|
||||||
hb_aat_layout_has_tracking (hb_face_t *face);
|
|
||||||
|
|
||||||
HB_INTERNAL void
|
HB_INTERNAL void
|
||||||
hb_aat_layout_track (const hb_ot_shape_plan_t *plan,
|
hb_aat_layout_track (const hb_ot_shape_plan_t *plan,
|
||||||
hb_font_t *font,
|
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);
|
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
|
int
|
||||||
main (int argc, char **argv)
|
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_types);
|
||||||
hb_test_add (test_aat_get_feature_selectors);
|
hb_test_add (test_aat_get_feature_selectors);
|
||||||
|
hb_test_add (test_aat_has);
|
||||||
|
|
||||||
face = hb_test_open_font_file ("fonts/aat-feat.ttf");
|
face = hb_test_open_font_file ("fonts/aat-feat.ttf");
|
||||||
sbix = hb_test_open_font_file ("fonts/chromacheck-sbix.ttf");
|
sbix = hb_test_open_font_file ("fonts/chromacheck-sbix.ttf");
|
||||||
|
|
Loading…
Reference in New Issue