Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set font size #22

Open
gitrinitas opened this issue Sep 23, 2022 · 2 comments
Open

Set font size #22

gitrinitas opened this issue Sep 23, 2022 · 2 comments

Comments

@gitrinitas
Copy link

When using gui.draw_text I would like to be able to set the font size somehow. The text is pretty small on a high-dpi monitor and becomes very difficult to read! I'm a bit of a noob when it comes to programming so I apologize if this is already possible...

@Felk
Copy link
Owner

Felk commented Dec 8, 2022

There's no easy way to change the font-size per-se (see e.g. ocornut/imgui#1018), but I could add a method to set the global font scale. this does not re-render the font atlas, so the font may look weird at non-integer scales. here's a gif of it alternating between x1, x1.5 and x2 scale:
set_font_global_scale
It also scales everything globally, you won't be able to render some text smaller than other text. Seeing you just want to see stuff on a high DPI display this might still be an easy solution. Does that sound good?

@gitrinitas
Copy link
Author

this looks great! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants