filament icon indicating copy to clipboard operation
filament copied to clipboard

Have an option to control UI/font size for image_viewer or gltf_viewer

Open z3moon opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. Currently the filament UI doesn't provide options to scale or magnify UI/font.

Describe the solution you'd like I'd like to have control over the size of UI/font for a certain set of sample apps.

z3moon avatar Oct 24 '23 20:10 z3moon

These are just sample/test apps, our goal is not to support them like real apps.

romainguy avatar Oct 24 '23 21:10 romainguy

In ImGuiHelper.cpp, we can pass a different value via io.Fonts->AddFontFromFileTTF(fontPath.c_str(), 16.0f); to change the font.

To do this dynamically, we may want to call ClearFonts() before readd the font again, which might also have to call ClearTexData() and ClearInputData() from ImFontAtlas.

z3moon avatar Oct 24 '23 22:10 z3moon