mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 23:11:04 +01:00
[util] Add quiet mode to hb-subset-depend
Add -q/--quiet to build and validate a dependency graph without spending time formatting or printing it. This makes graph-construction profiling and performance measurements straightforward. Tested with the full Meson test suite (270/270 passed). Assisted-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
1 parent
fd7c1835ea
commit
c1d4eeda7b
1 file changed
+9
@@ -38,6 +38,7 @@ struct depend_t : option_parser_t, face_options_t
|
||||
gboolean flagged_only = false;
|
||||
gboolean no_context = false;
|
||||
gboolean no_glyph_names = false;
|
||||
gboolean quiet = false;
|
||||
char *gids_str = nullptr;
|
||||
|
||||
void
|
||||
@@ -60,6 +61,8 @@ struct depend_t : option_parser_t, face_options_t
|
||||
"Suppress context set output", nullptr},
|
||||
{"no-glyph-names", 0, 0, G_OPTION_ARG_NONE, &this->no_glyph_names,
|
||||
"Use numeric glyph IDs instead of names", nullptr},
|
||||
{"quiet", 'q', 0, G_OPTION_ARG_NONE, &this->quiet,
|
||||
"Build the dependency graph without printing it", nullptr},
|
||||
{nullptr}
|
||||
};
|
||||
add_group (depend_entries,
|
||||
@@ -209,6 +212,12 @@ struct depend_t : option_parser_t, face_options_t
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (quiet)
|
||||
{
|
||||
hb_subset_depend_destroy (depend);
|
||||
return 0;
|
||||
}
|
||||
|
||||
hb_font_t *font = no_glyph_names ? nullptr : hb_font_create (face);
|
||||
|
||||
std::set<unsigned> gid_filter;
|
||||
|
||||
Reference in new issue
Block a user