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

Linux –– font too small, DPI cant be ajusted #132

Closed
leonard7e opened this issue Jul 3, 2020 · 4 comments
Closed

Linux –– font too small, DPI cant be ajusted #132

leonard7e opened this issue Jul 3, 2020 · 4 comments

Comments

@leonard7e
Copy link

System - Ubuntu Linux
Monitor: 24'' with 1920x1080

Font size is tiny and difficult to read. For comparison, look at attached image below.

Currently it seems there is no way to adjust font size via Xft//DPI.

Test shows that any DPI value I set in Ubuntu/Linux is overridden with value of 91. If number 91 is hardcoded into Godot, might there be an option to scale MaterialMaker UI to improve font readability on Linux machines?

font_size

@Calinou
Copy link
Contributor

Calinou commented Jul 3, 2020

Material Maker only supports integer scaling, as proper non-integer scaling requires a feature to be added into Godot: godotengine/godot#21446

hiDPI mode is automatically enabled if the screen width exceeds 2048 pixels and the reported DPI is greater than or equal to 192:

# Upscale everything if the display requires it (crude hiDPI support).
# This prevents UI elements from being too small on hiDPI displays.
if OS.get_screen_dpi() >= 192 and OS.get_screen_size().x >= 2048:
get_tree().set_screen_stretch(SceneTree.STRETCH_MODE_DISABLED, SceneTree.STRETCH_ASPECT_IGNORE, Vector2(), 2)

Currently it seems there is no way to adjust font size via Xft//DPI.

Godot uses its own font rendering, so that won't fix it.

@Zireael07
Copy link

@Calinou: IIRC some devices report DPI badly, on top of what you said?

@Calinou
Copy link
Contributor

Calinou commented Jul 3, 2020

@Zireael07 That too, but this is an entirely separate issue. Either way, we should add an option to force a specific UI scale once we add non-integer scaling.

It might be possible to add an option that changes just the font size, but this is bound to make many UI elements look uncanny or entirely broken. It should be enough to make Material Maker usable on hiDPI displays, but care needs to be taken to resize UI elements properly when the font size is changed.

PS: This issue is essentially a duplicate of #82.

@leonard7e
Copy link
Author

leonard7e commented Jul 3, 2020

I opened more general #132, because I like to make sure non-hdpi case is handled too. If so, I am perfectly fine #132 is seen as duplicate.

91 == sqrt(1920**2+1080**2) / 24
There 91 DPI seems to come from.

Thinking about it, this DPI is formally correct for my screen. But it does not work for me as user. In my workflow I do use multiple monitors, each is 80cm to 100cm away from my eyes. Scaling DPI to 128 DPI balances out eye distance and font size, keeps computing agreeable.

Formally correct DPI for screen is not nescesarly ergonomic for a user. A user might need to scale UI independently from screen resolution to adapt UI to his needs, especially in multi monitoring workflows.

In Godot, a floating point option to scale UI would be great way to balance formally correct DPI with user needs.

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

4 participants