[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>
diff --git a/util/hb-subset-depend.cc b/util/hb-subset-depend.cc index d58fca9..b922ebf 100644 --- a/util/hb-subset-depend.cc +++ b/util/hb-subset-depend.cc
@@ -38,6 +38,7 @@ 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 @@ "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 @@ 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;