From c329ce1000ee202700582396b0a47918d815e22e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 6 Aug 2021 19:13:21 -0600 Subject: [PATCH] [util] Also hide ppem settings in hb-ot-shape-closure Leaving ptem, as that can in theory change shape closure if we apply it to optical-size axis (we currently don't). --- util/options.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/util/options.cc b/util/options.cc index 88082051a..31a98b14a 100644 --- a/util/options.cc +++ b/util/options.cc @@ -573,12 +573,15 @@ font_options_t::add_options (option_parser_t *parser) parser->free_later (font_size_text); } + unsigned font_size_flags = DEFAULT_FONT_SIZE == FONT_SIZE_NONE ? G_OPTION_FLAG_HIDDEN : 0; GOptionEntry entries[] = { - {"font-size", 0, DEFAULT_FONT_SIZE ? 0 : G_OPTION_FLAG_HIDDEN, + {"font-size", 0, font_size_flags, G_OPTION_ARG_CALLBACK, (gpointer) &parse_font_size, font_size_text, "1/2 integers or 'upem'"}, - {"font-ppem", 0, 0, G_OPTION_ARG_CALLBACK, (gpointer) &parse_font_ppem, "Set x,y pixels per EM (default: 0; disabled)", "1/2 integers"}, - {"font-ptem", 0, 0, G_OPTION_ARG_DOUBLE, &this->ptem, "Set font point-size (default: 0; disabled)", "point-size"}, + {"font-ppem", 0, font_size_flags, + G_OPTION_ARG_CALLBACK, (gpointer) &parse_font_ppem, "Set x,y pixels per EM (default: 0; disabled)", "1/2 integers"}, + {"font-ptem", 0, 0, + G_OPTION_ARG_DOUBLE, &this->ptem, "Set font point-size (default: 0; disabled)", "point-size"}, {"font-funcs", 0, 0, G_OPTION_ARG_STRING, &this->font_funcs, text, "impl"}, {"ft-load-flags", 0, 0, G_OPTION_ARG_INT, &this->ft_load_flags, "Set FreeType load-flags (default: 2)", "integer"}, {nullptr}