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

GUI Scaling #53

Open
tatjam opened this issue Feb 16, 2023 · 3 comments
Open

GUI Scaling #53

tatjam opened this issue Feb 16, 2023 · 3 comments

Comments

@tatjam
Copy link
Collaborator

tatjam commented Feb 16, 2023

Allow a setting on settings.toml that activates a high scale GUI for users with very big monitors.
This behavior should be implemented in skins, and also accessible from lua to allow modders to specify sane default sizes.

@tatjam
Copy link
Collaborator Author

tatjam commented Feb 16, 2023

A complication to keep in mind is that the bitmap font must also be scaled. This may result in blurriness, so it seems like a better idea to implement two bitmap fonts, one for small scale and another one for big scale.

@tigercoding56
Copy link

A complication to keep in mind is that the bitmap font must also be scaled. This may result in blurriness, so it seems like a better idea to implement two bitmap fonts, one for small scale and another one for big scale.

maybe it would be better to use 1 vector font

@tatjam
Copy link
Collaborator Author

tatjam commented May 8, 2023

maybe it would be better to use 1 vector font

The problem with this approach is that vector fonts are unable to achieve the "pixel font" style of the compact GUI. On the large GUI a vector font will work just fine, but on smaller screens even with FreeType vector fonts can be a bit blurry.

I've recently experimented with the nanovgXC library (https://github.com/styluslabs/nanovgXC) and it supports signed distance field fonts. These are supposedly very crisp, but I haven't tested it yet. This library would likely be a drop-in replacement (it has exactly the same API as nanovg, which is currently used) so that would be cool.

Another approach would be to simply replace the bitmap text with vectors on the large scale, as the blurryness associated with vector fonts disappears with more pixels.

EDIT: nanovgXC also supports another font rendering technique, both could be tested to see which one looks better at small font sizes.

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