diff --git a/util/hb-ot-shape-closure.cc b/util/hb-ot-shape-closure.cc index a77fc8213..7321f93b6 100644 --- a/util/hb-ot-shape-closure.cc +++ b/util/hb-ot-shape-closure.cc @@ -37,6 +37,7 @@ struct shape_closure_consumer_t { void add_options (struct option_parser_t *parser) { + parser->set_summary ("Find glyph set from input text under shaping closure."); shaper.add_options (parser); GOptionEntry entries[] = diff --git a/util/hb-shape.cc b/util/hb-shape.cc index d8922dc71..13c277a2a 100644 --- a/util/hb-shape.cc +++ b/util/hb-shape.cc @@ -40,6 +40,7 @@ struct output_buffer_t : output_options_t<> { void add_options (option_parser_t *parser) { + parser->set_summary ("Shape text with given font."); output_options_t::add_options (parser, hb_buffer_serialize_list_formats ()); format.add_options (parser); } diff --git a/util/hb-subset.cc b/util/hb-subset.cc index d3812a39c..3817dd5b2 100644 --- a/util/hb-subset.cc +++ b/util/hb-subset.cc @@ -586,6 +586,8 @@ subset_main_t::collect_rest (const char *name, void subset_main_t::add_options () { + set_summary ("Subset fonts to specification."); + face_options_t::add_options (this); GOptionEntry glyphset_entries[] = diff --git a/util/options.hh b/util/options.hh index ebbd485ee..b3be16d66 100644 --- a/util/options.hh +++ b/util/options.hh @@ -72,8 +72,8 @@ fail (hb_bool_t suggest_help, const char *format, ...) struct option_parser_t { - option_parser_t (const char *usage = nullptr) - : context (g_option_context_new (usage)), + option_parser_t (const char *parameter_string = nullptr) + : context (g_option_context_new (parameter_string)), to_free (g_ptr_array_new ()) {} @@ -130,6 +130,15 @@ struct option_parser_t g_option_context_set_main_group (context, group); } + void set_summary (const char *summary) + { + g_option_context_set_summary (context, summary); + } + void set_description (const char *description) + { + g_option_context_set_description (context, description); + } + void free_later (char *p) { g_ptr_array_add (to_free, p); } diff --git a/util/view-cairo.hh b/util/view-cairo.hh index e48d9d508..1578f13e3 100644 --- a/util/view-cairo.hh +++ b/util/view-cairo.hh @@ -40,6 +40,7 @@ struct view_cairo_t : view_options_t, output_options_t<> void add_options (option_parser_t *parser) { + parser->set_summary ("View text with given font."); view_options_t::add_options (parser); output_options_t::add_options (parser, helper_cairo_supported_formats); }