From e7bbd69a90e82f6fbcd81b2d1b0e1f8e17ec3123 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 14 Feb 2026 18:26:36 -0300 Subject: [PATCH] [hb-draw] Remove --quiet option and all related code Removes the --quiet/-q option that output raw path data only. This simplifies the codebase by eliminating the write_raw_paths() function and associated logic. Co-Authored-By: Claude Sonnet 4.5 --- util/draw-output.hh | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/util/draw-output.hh b/util/draw-output.hh index 0e9a94079..492b18cd7 100644 --- a/util/draw-output.hh +++ b/util/draw-output.hh @@ -73,7 +73,6 @@ struct draw_output_t : output_options_t<> GOptionEntry entries[] = { - {"quiet", 'q', 0, G_OPTION_ARG_NONE, &this->quiet, "Path-data only; implies --flat", nullptr}, {"flat", 0, 0, G_OPTION_ARG_NONE, &this->flat, "Flatten geometry and disable reuse", nullptr}, {"precision", 0, 0, G_OPTION_ARG_INT, &this->precision, "Decimal precision (default: 2)", "N"}, {"no-color", 0, 0, G_OPTION_ARG_NONE, &this->no_color, "Disable color font rendering", nullptr}, @@ -101,12 +100,6 @@ struct draw_output_t : output_options_t<> return; } - if (quiet) - { - flat = true; - no_color = true; - } - if (background_str) { unsigned r, g, b, a; @@ -239,9 +232,7 @@ struct draw_output_t : output_options_t<> template void finish (hb_buffer_t *buffer HB_UNUSED, const app_t *font_opts HB_UNUSED) { - if (quiet) - write_raw_paths (); - else if (flat) + if (flat) write_flat_svg (); else write_reuse_svg (); @@ -1050,26 +1041,6 @@ struct draw_output_t : output_options_t<> g_string_free (all_body, true); } - void write_raw_paths () - { - layout_t layout = compute_layout (false); - - for (unsigned li = 0; li < lines.size (); li++) - { - const line_t &line = lines[li]; - const auto &offset = layout.offsets[li]; - for (const glyph_instance_t &glyph : line.glyphs) - { - draw_data_t data = glyph_draw_data (layout, offset, glyph); - if (draw_glyph (upem_font, glyph.gid, data)) - fprintf (out_fp, "%s\n", path->str); - else - fprintf (out_fp, "\n"); - } - } - } - - hb_bool_t quiet = false; hb_bool_t flat = false; hb_bool_t no_color = false; int precision = 2;