From 752ad51cce0c3e6033ed6de6d8257f46129fac06 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 22 Jan 2023 10:07:24 -0700 Subject: [PATCH] [hb-info] Move some initialization to post_parse --- util/hb-info.cc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/util/hb-info.cc b/util/hb-info.cc index d095ef1b9..e32c18545 100644 --- a/util/hb-info.cc +++ b/util/hb-info.cc @@ -116,7 +116,7 @@ struct info_t "Query options:", "Options to query the font instance", this, - false); + true); } protected: @@ -171,13 +171,9 @@ struct info_t public: - template - void operator () (app_t *app) + void + post_parse (GError **error) { - blob = hb_blob_reference (((font_options_t *) app)->blob); - face = hb_face_reference (((font_options_t *) app)->face); - font = hb_font_reference (((font_options_t *) app)->font); - verbose = !app->quiet; if (direction_str) direction = hb_direction_from_string (direction_str, -1); if (script_str) @@ -185,6 +181,15 @@ struct info_t language = hb_language_get_default (); if (language_str) language = hb_language_from_string (language_str, -1); + } + + template + void operator () (app_t *app) + { + blob = hb_blob_reference (((font_options_t *) app)->blob); + face = hb_face_reference (((font_options_t *) app)->face); + font = hb_font_reference (((font_options_t *) app)->font); + verbose = !app->quiet; if (all) {