Move hb_ot_layout_closure_{features,lookups} behind EXPERIMENTAL flag
This commit is contained in:
parent
9b7fb5c23f
commit
29c903223b
|
@ -34,7 +34,9 @@ hb_draw_funcs_set_cubic_to_func
|
|||
hb_draw_funcs_set_line_to_func
|
||||
hb_draw_funcs_set_move_to_func
|
||||
hb_draw_funcs_set_quadratic_to_func
|
||||
hb_font_get_var_coords_design""".splitlines ()
|
||||
hb_font_get_var_coords_design
|
||||
hb_ot_layout_closure_lookups
|
||||
hb_ot_layout_closure_features""".splitlines ()
|
||||
symbols = [x for x in symbols if x not in experimental_symbols]
|
||||
symbols = "\n".join (symbols)
|
||||
|
||||
|
|
|
@ -1203,6 +1203,7 @@ hb_ot_layout_collect_lookups (hb_face_t *face,
|
|||
g.feature_variation_collect_lookups (&feature_indexes, lookup_indexes);
|
||||
}
|
||||
|
||||
#ifdef HB_EXPERIMENTAL_API
|
||||
/**
|
||||
* hb_ot_layout_closure_lookups:
|
||||
* @face: #hb_face_t to work upon
|
||||
|
@ -1266,6 +1267,7 @@ hb_ot_layout_closure_features (hb_face_t *face,
|
|||
const OT::GSUBGPOS &g = get_gsubgpos_table (face, table_tag);
|
||||
g.closure_features (lookup_indexes, feature_indexes);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef HB_NO_LAYOUT_COLLECT_GLYPHS
|
||||
|
|
|
@ -263,6 +263,7 @@ hb_ot_layout_collect_lookups (hb_face_t *face,
|
|||
const hb_tag_t *features,
|
||||
hb_set_t *lookup_indexes /* OUT */);
|
||||
|
||||
#ifdef HB_EXPERIMENTAL_API
|
||||
HB_EXTERN void
|
||||
hb_ot_layout_closure_lookups (hb_face_t *face,
|
||||
hb_tag_t table_tag,
|
||||
|
@ -274,6 +275,7 @@ hb_ot_layout_closure_features (hb_face_t *face,
|
|||
hb_tag_t table_tag,
|
||||
const hb_map_t *lookup_indexes, /* IN */
|
||||
hb_set_t *feature_indexes /* OUT */);
|
||||
#endif
|
||||
|
||||
HB_EXTERN void
|
||||
hb_ot_layout_lookup_collect_glyphs (hb_face_t *face,
|
||||
|
|
|
@ -51,6 +51,7 @@ _add_cff_seac_components (const OT::cff1::accelerator_t &cff,
|
|||
#endif
|
||||
|
||||
#ifndef HB_NO_SUBSET_LAYOUT
|
||||
#ifdef HB_EXPERIMENTAL_API
|
||||
static void
|
||||
_remap_indexes (const hb_set_t *indexes,
|
||||
hb_map_t *mapping /* OUT */)
|
||||
|
@ -61,6 +62,7 @@ _remap_indexes (const hb_set_t *indexes,
|
|||
mapping->set (_.first, _.second);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline void
|
||||
_gsub_closure_glyphs_lookups_features (hb_face_t *face,
|
||||
|
@ -78,6 +80,7 @@ _gsub_closure_glyphs_lookups_features (hb_face_t *face,
|
|||
hb_ot_layout_lookups_substitute_closure (face,
|
||||
&lookup_indices,
|
||||
gids_to_retain);
|
||||
#ifdef HB_EXPERIMENTAL_API
|
||||
hb_ot_layout_closure_lookups (face,
|
||||
HB_OT_TAG_GSUB,
|
||||
gids_to_retain,
|
||||
|
@ -91,6 +94,7 @@ _gsub_closure_glyphs_lookups_features (hb_face_t *face,
|
|||
gsub_lookups,
|
||||
&feature_indices);
|
||||
_remap_indexes (&feature_indices, gsub_features);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
@ -106,6 +110,7 @@ _gpos_closure_lookups_features (hb_face_t *face,
|
|||
nullptr,
|
||||
nullptr,
|
||||
&lookup_indices);
|
||||
#ifdef HB_EXPERIMENTAL_API
|
||||
hb_ot_layout_closure_lookups (face,
|
||||
HB_OT_TAG_GPOS,
|
||||
gids_to_retain,
|
||||
|
@ -119,6 +124,7 @@ _gpos_closure_lookups_features (hb_face_t *face,
|
|||
gpos_lookups,
|
||||
&feature_indices);
|
||||
_remap_indexes (&feature_indices, gpos_features);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -75,12 +75,16 @@ test_font (hb_font_t *font, hb_codepoint_t cp)
|
|||
|
||||
hb_set_t *lookup_indexes = hb_set_create ();
|
||||
hb_set_add (lookup_indexes, 0);
|
||||
#ifdef HB_EXPERIMENTAL_API
|
||||
hb_ot_layout_closure_lookups (face, HB_OT_TAG_GSUB, set, lookup_indexes);
|
||||
#endif
|
||||
|
||||
hb_map_t *lookup_mapping = hb_map_create ();
|
||||
hb_map_set (lookup_mapping, 0, 0);
|
||||
hb_set_t *feature_indices = hb_set_create ();
|
||||
#ifdef HB_EXPERIMENTAL_API
|
||||
hb_ot_layout_closure_features (face, HB_OT_TAG_GSUB, lookup_mapping, feature_indices);
|
||||
#endif
|
||||
hb_set_destroy (lookup_indexes);
|
||||
hb_set_destroy (feature_indices);
|
||||
hb_map_destroy (lookup_mapping);
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
static void
|
||||
test_subset_gpos_lookup_subtable (void)
|
||||
{
|
||||
#ifdef HB_EXPERIMENTAL_API
|
||||
hb_face_t *face_pwa = hb_test_open_font_file ("fonts/Roboto-Regular-gpos-.aw.ttf");
|
||||
hb_face_t *face_wa = hb_test_open_font_file ("fonts/Roboto-Regular-gpos-aw.ttf");
|
||||
|
||||
|
@ -52,12 +53,14 @@ test_subset_gpos_lookup_subtable (void)
|
|||
hb_face_destroy (face_pwa_subset);
|
||||
hb_face_destroy (face_pwa);
|
||||
hb_face_destroy (face_wa);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* TODO: Once GDEF subsetting is implemented, this test may fail & expected result need update. */
|
||||
static void
|
||||
test_subset_gpos_pairpos1_vf (void)
|
||||
{
|
||||
#ifdef HB_EXPERIMENTAL_API
|
||||
hb_face_t *face_wav = hb_test_open_font_file ("fonts/AdobeVFPrototype.WAV.gpos.otf");
|
||||
hb_face_t *face_wa = hb_test_open_font_file ("fonts/AdobeVFPrototype.WA.gpos.otf");
|
||||
|
||||
|
@ -78,6 +81,7 @@ test_subset_gpos_pairpos1_vf (void)
|
|||
hb_face_destroy (face_wav_subset);
|
||||
hb_face_destroy (face_wav);
|
||||
hb_face_destroy (face_wa);
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -4,6 +4,14 @@ TESTS = \
|
|||
tests/cff-full-font.tests \
|
||||
tests/japanese.tests \
|
||||
tests/cff-japanese.tests \
|
||||
tests/cmap.tests \
|
||||
tests/cmap14.tests \
|
||||
tests/sbix.tests \
|
||||
tests/colr.tests \
|
||||
tests/cbdt.tests \
|
||||
$(NULL)
|
||||
|
||||
DISABLED_TESTS = \
|
||||
tests/layout.tests \
|
||||
tests/layout.gpos.tests \
|
||||
tests/layout.gpos2.tests \
|
||||
|
@ -13,11 +21,6 @@ TESTS = \
|
|||
tests/layout.gsub3.tests \
|
||||
tests/layout.gsub6.tests \
|
||||
tests/layout.gdef.tests \
|
||||
tests/cmap.tests \
|
||||
tests/cmap14.tests \
|
||||
tests/sbix.tests \
|
||||
tests/colr.tests \
|
||||
tests/cbdt.tests \
|
||||
$(NULL)
|
||||
|
||||
XFAIL_TESTS = \
|
||||
|
|
|
@ -4,15 +4,15 @@ tests = [
|
|||
'cff-full-font',
|
||||
'japanese',
|
||||
'cff-japanese',
|
||||
'layout',
|
||||
'layout.gpos',
|
||||
'layout.gpos2',
|
||||
'layout.gpos3',
|
||||
'layout.gpos4',
|
||||
'layout.gpos6',
|
||||
'layout.gsub3',
|
||||
'layout.gsub6',
|
||||
'layout.gdef',
|
||||
#'layout',
|
||||
#'layout.gpos',
|
||||
#'layout.gpos2',
|
||||
#'layout.gpos3',
|
||||
#'layout.gpos4',
|
||||
#'layout.gpos6',
|
||||
#'layout.gsub3',
|
||||
#'layout.gsub6',
|
||||
#'layout.gdef',
|
||||
'cmap',
|
||||
'cmap14',
|
||||
'sbix',
|
||||
|
|
Loading…
Reference in New Issue