diff --git a/src/vt-tv/utility/parse_render.cc b/src/vt-tv/utility/parse_render.cc index bf41ae41bd..c10b9b1a47 100644 --- a/src/vt-tv/utility/parse_render.cc +++ b/src/vt-tv/utility/parse_render.cc @@ -129,8 +129,10 @@ void ParseRender::parseAndRender(PhaseType phase_id, std::unique_ptr info) std::string output_dir; std::filesystem::path output_path; std::string output_file_stem; - uint64_t win_size; - uint64_t font_size; + uint64_t win_size = 2000; + // Use automatic font size if not defined by user + // 0.025 is the factor of the window size determined to be ideal for the font size + uint64_t font_size = 0.025 * win_size; if (save_meshes || save_pngs) { output_dir = config["output"]["directory"].as(); @@ -151,14 +153,12 @@ void ParseRender::parseAndRender(PhaseType phase_id, std::unique_ptr info) fmt::print("Num ranks={}\n", info->getNumRanks()); - win_size = 2000; if (config["output"]["window_size"]) { win_size = config["output"]["window_size"].as(); + // Update font_size with new win_size + font_size = 0.025 * win_size; } - // Use automatic font size if not defined by user - // 0.025 is the factor of the window size determined to be ideal for the font size - font_size = 0.025 * win_size; if (config["output"]["font_size"]) { font_size = config["output"]["font_size"].as(); }