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

font misplaced on title screen #651

Closed
bobbens opened this issue Feb 22, 2025 · 9 comments · Fixed by #652
Closed

font misplaced on title screen #651

bobbens opened this issue Feb 22, 2025 · 9 comments · Fixed by #652

Comments

@bobbens
Copy link

bobbens commented Feb 22, 2025

Just tried latest master and text seems to be misplaced on the main screen. tested on Arch Linux with wayland. See attached screenshot for reference. In-game stuff seems to be fine, but barely tested.

Furthermore, the menu stuff at the top is tiny, would be nice to have it scale too, but probably worth another issue.

Image

@NQNStudios
Copy link
Collaborator

Thanks for reporting this! I must have not made the unblurred text offset properly in fullscreen window modes.

@NQNStudios
Copy link
Collaborator

I found the fix and made a pull request. :)

@CelticMinstrel
Copy link
Member

CelticMinstrel commented Feb 22, 2025

Furthermore, the menu stuff at the top is tiny, would be nice to have it scale too, but probably worth another issue.

This is drawn by the operating system, so I don't think we can do much about it. Maybe you can do something in System Preferences? I'm not really sure.

EDIT: Oh, I missed that you're on Linux, not Mac. I couldn't tell the difference from the scaled-down screenshot. In that case, sure, we could probably make the menubar scale on Linux. This makes me wonder what it's like on Windows, too…

@bobbens
Copy link
Author

bobbens commented Feb 23, 2025

Furthermore, the menu stuff at the top is tiny, would be nice to have it scale too, but probably worth another issue.

This is drawn by the operating system, so I don't think we can do much about it. Maybe you can do something in System Preferences? I'm not really sure.

EDIT: Oh, I missed that you're on Linux, not Mac. I couldn't tell the difference from the scaled-down screenshot. In that case, sure, we could probably make the menubar scale on Linux. This makes me wonder what it's like on Windows, too…

it's a bit of a mess with wayland now... kde/gtk tend to scale well, other libraries, not so well. Not sure what CBOE is using, but probably have to tell it to scale (or file a bug upstream if necessary).

@CelticMinstrel
Copy link
Member

it's a bit of a mess with wayland now... kde/gtk tend to scale well, other libraries, not so well. Not sure what CBOE is using, but probably have to tell it to scale (or file a bug upstream if necessary).

I think that's possibly irrelevant? Since the menus on Linux are being drawn with SFML.

@bobbens
Copy link
Author

bobbens commented Feb 23, 2025

it's a bit of a mess with wayland now... kde/gtk tend to scale well, other libraries, not so well. Not sure what CBOE is using, but probably have to tell it to scale (or file a bug upstream if necessary).

I think that's possibly irrelevant? Since the menus on Linux are being drawn with SFML.

So they are fully implemented in SFML? Then support for high DPI would probably have to be added manually.

@CelticMinstrel
Copy link
Member

To be specific, they're drawn using TGUI, which is an SFML library that provides graphical widgets.

@bobbens
Copy link
Author

bobbens commented Feb 24, 2025

To be specific, they're drawn using TGUI, which is an SFML library that provides graphical widgets.

What I found about TGUI: https://tgui.eu/tutorials/latest-stable/dpi-scaling/

TLDR: You'll have to add something like:

// Sets 200% scaling
gui.setRelativeView({0, 0, 0.5f, 0.5f});
tgui::getBackend()->setFontScale(2.0f);

One issue is that SFML 2 does not seem to have any way to actually know the correct scaling factor though...

@CelticMinstrel
Copy link
Member

One issue is that SFML 2 does not seem to have any way to actually know the correct scaling factor though...

That doesn't seem to be an issue – since we're allowing the user to choose the scaling factor in preferences, it makes sense to just use the same factor for TGUI.

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

Successfully merging a pull request may close this issue.

3 participants