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

Window content is blurry on Wayland with fractional scaling #7433

Open
mimi89999 opened this issue Mar 23, 2024 · 2 comments
Open

Window content is blurry on Wayland with fractional scaling #7433

mimi89999 opened this issue Mar 23, 2024 · 2 comments
Labels

Comments

@mimi89999
Copy link

Version/Branch of Dear ImGui:

868facf

Back-ends:

glfw+opengl3

Compiler, OS:

Debian Trixie

Full config/build information:

Dear ImGui 1.90.5 WIP (19046)
--------------------------------
sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=201103
define: __linux__
define: __GNUC__=13
--------------------------------
io.BackendPlatformName: imgui_impl_glfw
io.BackendRendererName: imgui_impl_opengl3
io.ConfigFlags: 0x00000003
 NavEnableKeyboard
 NavEnableGamepad
io.ConfigInputTextCursorBlink
io.ConfigWindowsResizeFromEdges
io.ConfigMemoryCompactTimer = 60.0
io.BackendFlags: 0x0000000E
 HasMouseCursors
 HasSetMousePos
 RendererHasVtxOffset
--------------------------------
io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,64
io.DisplaySize: 1280.00,720.00
io.DisplayFramebufferScale: 1.25,1.25
--------------------------------
style.WindowPadding: 8.00,8.00
style.WindowBorderSize: 1.00
style.FramePadding: 4.00,3.00
style.FrameRounding: 0.00
style.FrameBorderSize: 0.00
style.ItemSpacing: 8.00,4.00
style.ItemInnerSpacing: 4.00,4.00

Details:

My Issue:

On Linux systems (didn't test others) with HiDPI screens and Wayland, when fractional scaling is enabled, imgui window content is blurry. It has the correct size though.

Screenshots/Video:

Capture d’écran du 2024-03-23 18-48-58

Minimal, Complete and Verifiable Example code:

Simply run example_glfw_opengl3

@cfillion
Copy link
Contributor

The built-in font is made of 13px bitmaps. Scaling it to anything but an integer will look blurry. Try loading a vector font at the appropriate scaled size.

https://github.com/ocornut/imgui/blob/master/docs/FONTS.md

@mimi89999
Copy link
Author

I loaded the Cantarell and Roboto fonts and nothing changed.

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

No branches or pull requests

3 participants