Skip to content

Commit

Permalink
Add font-size option to CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
crocdialer committed Sep 22, 2024
1 parent 04af36c commit af6fbc5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions projects/pbr_viewer/pbr_viewer_load_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,7 @@ bool PBRViewer::parse_override_settings(int argc, char *argv[])
options.add_options()("v,verbose", "verbose printing");
options.add_options()("f,fullscreen", "enable fullscreen");
options.add_options()("font", "provide a font-file (.ttf | .otf)", cxxopts::value<std::string>());
options.add_options()("font-size", "provide a font-size", cxxopts::value<float>());
options.add_options()("validation", "enable vulkan validation");
options.add_options()("files", "provided input files", cxxopts::value<std::vector<std::string>>());
options.parse_positional("files");
Expand Down Expand Up @@ -752,6 +753,7 @@ bool PBRViewer::parse_override_settings(int argc, char *argv[])
if(result.count("height")) { m_settings.window_info.size.y = (int) result["height"].as<uint32_t>(); }
if(result.count("fullscreen") && result["fullscreen"].as<bool>()) { m_settings.window_info.fullscreen = true; }
if(result.count("font")) { m_settings.font_url = result["font"].as<std::string>(); }
if(result.count("font-size")) { m_settings.ui_font_scale = result["font-size"].as<float>(); }
if(result.count("validation") && result["validation"].as<bool>()) { m_settings.use_validation = true; }
if(result.count("verbose") && result["verbose"].as<bool>()) { m_settings.log_level = spdlog::level::debug; }
return true;
Expand Down

0 comments on commit af6fbc5

Please sign in to comment.