Revert "[subset] Add "--name-languages" and "--name-legacy" options"
Causes tests failures, please reapply when tests are fixed, thanks.
This reverts commit fd85818b5b
.
This commit is contained in:
parent
298c46afbf
commit
e171beeb5f
@ -108,15 +108,6 @@ struct NameRecord
|
||||
return_trace (out);
|
||||
}
|
||||
|
||||
bool isUnicode () const
|
||||
{
|
||||
unsigned int p = platformID;
|
||||
unsigned int e = encodingID;
|
||||
|
||||
return (p == 0 ||
|
||||
(p == 3 && (e == 0 || e == 1 || e == 10)));
|
||||
}
|
||||
|
||||
bool sanitize (hb_sanitize_context_t *c, const void *base) const
|
||||
{
|
||||
TRACE_SANITIZE (this);
|
||||
@ -219,8 +210,6 @@ struct name
|
||||
auto it =
|
||||
+ nameRecordZ.as_array (count)
|
||||
| hb_filter (c->plan->name_ids, &NameRecord::nameID)
|
||||
| hb_filter (c->plan->name_languages, &NameRecord::languageID)
|
||||
| hb_filter ([&] (const NameRecord& namerecord) { return c->plan->name_legacy || namerecord.isUnicode (); })
|
||||
;
|
||||
|
||||
name_prime->serialize (c->serializer, it, hb_addressof (this + stringOffset));
|
||||
|
@ -46,13 +46,10 @@ hb_subset_input_create_or_fail ()
|
||||
input->glyphs = hb_set_create ();
|
||||
input->name_ids = hb_set_create ();
|
||||
hb_set_add_range (input->name_ids, 0, 6);
|
||||
input->name_languages = hb_set_create ();
|
||||
hb_set_add (input->name_languages, 0x0409);
|
||||
input->drop_tables = hb_set_create ();
|
||||
input->drop_hints = false;
|
||||
input->desubroutinize = false;
|
||||
input->retain_gids = false;
|
||||
input->name_legacy = false;
|
||||
|
||||
hb_tag_t default_drop_tables[] = {
|
||||
// Layout disabled by default
|
||||
@ -117,7 +114,6 @@ hb_subset_input_destroy (hb_subset_input_t *subset_input)
|
||||
hb_set_destroy (subset_input->unicodes);
|
||||
hb_set_destroy (subset_input->glyphs);
|
||||
hb_set_destroy (subset_input->name_ids);
|
||||
hb_set_destroy (subset_input->name_languages);
|
||||
hb_set_destroy (subset_input->drop_tables);
|
||||
|
||||
free (subset_input);
|
||||
@ -153,12 +149,6 @@ hb_subset_input_nameid_set (hb_subset_input_t *subset_input)
|
||||
return subset_input->name_ids;
|
||||
}
|
||||
|
||||
HB_EXTERN hb_set_t *
|
||||
hb_subset_input_namelangid_set (hb_subset_input_t *subset_input)
|
||||
{
|
||||
return subset_input->name_languages;
|
||||
}
|
||||
|
||||
HB_EXTERN hb_set_t *
|
||||
hb_subset_input_drop_tables_set (hb_subset_input_t *subset_input)
|
||||
{
|
||||
@ -214,16 +204,3 @@ hb_subset_input_get_retain_gids (hb_subset_input_t *subset_input)
|
||||
{
|
||||
return subset_input->retain_gids;
|
||||
}
|
||||
|
||||
HB_EXTERN void
|
||||
hb_subset_input_set_name_legacy (hb_subset_input_t *subset_input,
|
||||
hb_bool_t name_legacy)
|
||||
{
|
||||
subset_input->name_legacy = name_legacy;
|
||||
}
|
||||
|
||||
HB_EXTERN hb_bool_t
|
||||
hb_subset_input_get_name_legacy (hb_subset_input_t *subset_input)
|
||||
{
|
||||
return subset_input->name_legacy;
|
||||
}
|
||||
|
@ -41,13 +41,11 @@ struct hb_subset_input_t
|
||||
hb_set_t *unicodes;
|
||||
hb_set_t *glyphs;
|
||||
hb_set_t *name_ids;
|
||||
hb_set_t *name_languages;
|
||||
hb_set_t *drop_tables;
|
||||
|
||||
bool drop_hints;
|
||||
bool desubroutinize;
|
||||
bool retain_gids;
|
||||
bool name_legacy;
|
||||
/* TODO
|
||||
*
|
||||
* features
|
||||
|
@ -278,11 +278,9 @@ hb_subset_plan_create (hb_face_t *face,
|
||||
plan->drop_hints = input->drop_hints;
|
||||
plan->desubroutinize = input->desubroutinize;
|
||||
plan->retain_gids = input->retain_gids;
|
||||
plan->name_legacy = input->name_legacy;
|
||||
plan->unicodes = hb_set_create ();
|
||||
plan->name_ids = hb_set_reference (input->name_ids);
|
||||
_nameid_closure (face, plan->name_ids);
|
||||
plan->name_languages = hb_set_reference (input->name_languages);
|
||||
plan->drop_tables = hb_set_reference (input->drop_tables);
|
||||
plan->source = hb_face_reference (face);
|
||||
plan->dest = hb_face_builder_create ();
|
||||
@ -325,7 +323,6 @@ hb_subset_plan_destroy (hb_subset_plan_t *plan)
|
||||
|
||||
hb_set_destroy (plan->unicodes);
|
||||
hb_set_destroy (plan->name_ids);
|
||||
hb_set_destroy (plan->name_languages);
|
||||
hb_set_destroy (plan->drop_tables);
|
||||
hb_face_destroy (plan->source);
|
||||
hb_face_destroy (plan->dest);
|
||||
|
@ -42,7 +42,6 @@ struct hb_subset_plan_t
|
||||
bool drop_hints : 1;
|
||||
bool desubroutinize : 1;
|
||||
bool retain_gids : 1;
|
||||
bool name_legacy : 1;
|
||||
|
||||
// For each cp that we'd like to retain maps to the corresponding gid.
|
||||
hb_set_t *unicodes;
|
||||
@ -50,9 +49,6 @@ struct hb_subset_plan_t
|
||||
// name_ids we would like to retain
|
||||
hb_set_t *name_ids;
|
||||
|
||||
// name_languages we would like to retain
|
||||
hb_set_t *name_languages;
|
||||
|
||||
// Tables which should be dropped.
|
||||
hb_set_t *drop_tables;
|
||||
|
||||
|
@ -57,9 +57,6 @@ hb_subset_input_glyph_set (hb_subset_input_t *subset_input);
|
||||
HB_EXTERN hb_set_t *
|
||||
hb_subset_input_nameid_set (hb_subset_input_t *subset_input);
|
||||
|
||||
HB_EXTERN hb_set_t *
|
||||
hb_subset_input_namelangid_set (hb_subset_input_t *subset_input);
|
||||
|
||||
HB_EXTERN hb_set_t *
|
||||
hb_subset_input_drop_tables_set (hb_subset_input_t *subset_input);
|
||||
|
||||
@ -81,12 +78,6 @@ hb_subset_input_set_retain_gids (hb_subset_input_t *subset_input,
|
||||
HB_EXTERN hb_bool_t
|
||||
hb_subset_input_get_retain_gids (hb_subset_input_t *subset_input);
|
||||
|
||||
HB_EXTERN void
|
||||
hb_subset_input_set_name_legacy (hb_subset_input_t *subset_input,
|
||||
hb_bool_t name_legacy);
|
||||
HB_EXTERN hb_bool_t
|
||||
hb_subset_input_get_name_legacy (hb_subset_input_t *subset_input);
|
||||
|
||||
/* hb_subset () */
|
||||
HB_EXTERN hb_face_t *
|
||||
hb_subset (hb_face_t *source, hb_subset_input_t *input);
|
||||
|
@ -71,11 +71,6 @@ hb_subset_test_create_input_from_nameids (const hb_set_t *name_ids)
|
||||
hb_subset_input_t *input = hb_subset_input_create_or_fail ();
|
||||
hb_set_t * input_name_ids = hb_subset_input_nameid_set (input);
|
||||
hb_set_set (input_name_ids, name_ids);
|
||||
|
||||
hb_set_t *name_langids = hb_subset_input_namelangid_set (input);
|
||||
hb_set_add_range (name_langids, 0, 0x5FFF);
|
||||
|
||||
hb_subset_input_set_name_legacy (input, true);
|
||||
return input;
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user