-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
DPI issue on OSX #33
Comments
@mindv0rtex , DPI scaling is a WIP and currently has no effect. The whole thing was pushed prematurely, regretfully. I was using Syntacts and the example mahi-gui app as testing grounds while working on it. In its present form, mahi-gui should do no DPI scaling yet (despite the option existing). I thought I would have this worked out soon enough that no one would catch it, but life got in the way. I just added a warning comment to not use it yet (it's the best I can do for now). Sorry for the mess. Hopefully this is something I can resolve sooner than later. Regarding sharper fonts, the general idea is that you load the font at a large size (e.g. 12 pt * dpi_scale), and then apply a global font scaling (e.g. 1.0 / dpi_scale). I was trying to make this work in DPI scaling ImGui in general is a bit confusing. There are two approaches: 1) manually scale all of ImGui's styling sizes and any hard coded window sizes, or 2) scale the framebuffer and continue to work under the assumption of 96 DPI. The latter is preferred, and what I hope to get working eventually. |
I am sorry I stumbled upon an unfinished feature I was not meant to find 😄
Is this something I can do now with mahi-gui or would I need to use vanilla Dear Imgui? |
@epezent, in case this could be helpful for you, I managed to make your code work for Retina scaling with very minor tweaks:
Font size scaling and the DPI scaling method 1 are left untouched. I get nice crisp looking fonts now. |
Looks like this param in GLFW is relevant:
|
I am new to Dear Imgui and I came across the Mahi GUI library as a starter kit. I started going thru the examples and immediately noticed that the fonts are a tad blurry. I am on OSX with the Retina monitor. I downloaded the Syntacts app just in case and saw the same issue with it:
I saw there's a DPI example in Mahi GUI, but it looks like it does not actually change the scaling factor, the reported DPI scale is still 1.0 when I pass the
-d
option there.In the end, my question is, can I somehow make the fonts look sharper?
The text was updated successfully, but these errors were encountered: